4,442 questions
0
votes
0
answers
8
views
RealityKit CollisionFilter: left and right child colliders both firing when only one is touched
I’m working with RealityKit and trying to detect on which side of a connector a sphere has collided.
The setup:
I have a connector (a cylinder).
It has two child entities, each one with its own ...
0
votes
0
answers
37
views
SOFA: elastic band tunnels through pegs under high strain/fast motion
I control two grippers with two Geomagic devices in a SOFA scene. The task is to grasp a soft elastic band (a torus) and place it into target configurations (shown at the beginning of the task).
When ...
0
votes
1
answer
80
views
How to make player lose only one life when hitting many spikes at once?
I have been working on a project in Godot 4.4.1 (a 2D platformer) and have added some spikes for the player to jump on; if you touch a spike, you lose a life.
The problem is that if there are two ...
0
votes
2
answers
176
views
Swept AABB collision between circle and rectangle
I'm fairly new to javascript, and I've been trying to build a small game to learn new concepts. An issue I'm encountering is that projectiles in the game often have a higher velocity than the width of ...
0
votes
1
answer
118
views
Don't understand iOS RealityKit's collision detection
I am trying to detect collisions between two RealityKit entities, but the results are unexpected.
I thus created a minimal example. In the iOS app below, 3 entities are set up:
A board, a fixed box ...
2
votes
1
answer
103
views
Collision detection of two rects with rounded borders
I wrote an algorithm how to detect the collision detection of two rects with rounded borders (the code was written using TypeScript but I tried to name things as clear as possible to code be readable ...
1
vote
1
answer
58
views
Problem SAT collision detection algorithm (circle-polygone)
def Axis(A, B): # RETURN A NORMALIZED NORMAL VECTOR (CHECKED)
dx = A[0] - B[0]
dy = A[1] - B[1]
n = [-dy, dx]
v = math.sqrt(dy ** 2 + dx ** 2)
return [n[0] / v, n[1] / v]
def ...
1
vote
0
answers
27
views
Why does my Separating Axis Theorem fail near world axes? Unity
Problem Description:
I am implementing collision detection between an OBB and an AABB using the Separating Axis Theorem (SAT) in Unity. The algorithm works perfectly in most cases, but I have noticed ...
0
votes
2
answers
50
views
How can I prevent two Rectangle2D from overlapping?
I am trying to create a Vampire survivor type game, and I am currently creating the logic of the enemies, but I have found a problem, and that is that they are able to overlap each other, to a point ...
0
votes
0
answers
24
views
Side scrolling collisionbox system either has player falling through floor or running out of memory based on my methods
I had a system with checking, but as it scrolled, I basically sank into the floor. I had chatGPT comment my code for helping with this.
The main problems seem to be the ReassignCollisionBox(), which ...
1
vote
1
answer
80
views
Collision doesn't work under very specific circumstances
This is my player's update function:
void update() {
IsOnWall = false;
IsOnFloor = false;
int collide[4] = { collidelist(Rect{pos.x, pos.y + vel.y, hitbox.width, vel.y + 1}, Stillbodies),
...
0
votes
1
answer
74
views
Unity 3D. My character is shaking on the surface
I use MVC in my Unity 3D project. I have CollisionPoller to determine contacts and movement. If I use my MoveController and CollisionPoller my character is shaking Y axis every frame per +/- 0.01.
If ...
3
votes
1
answer
115
views
Polygons on 2D plane: Calculate the exact shift to resolve overlaps
I'm working with polygons on a 2D plane that have Tetris-style gravity. Each polygon can rest either on the X-axis or on top of another polygon. If a polygon overlaps with any other polygon(s), it ...
0
votes
1
answer
543
views
Godot Mesh Create Collision shape: Mesh is empty
I have a very basic mesh imported for this example. I just resized the default blender cube to a more plane-like structure and exported it into glb and then imported it in Godot.
In Godot, I created a ...
1
vote
3
answers
191
views
Efficiently Finding Nearest Non-Colliding Position for a Rectangle in 2D Space?
I’ve been struggling with a problem related to collision detection and positioning in a 2D space, and I could really use some guidance on achieving good performance.
I have a rectangular boundary (...
1
vote
1
answer
96
views
Why does my player move diagonally through the colliders?
I have a simple setup. A player with a camera, a plane that the player walks on, and two walls with box colliders.
THE PROBLEM
When moving in one direction (X or Z-Axis), the player stops when ...
1
vote
1
answer
66
views
How to make a collision that works with rotation?
I have a problem because - if I rotate the block collision is still a box. I want to make hit boxes rotated too but I don't know what to do.
Also I don't use import in libraries.
Here is my code to ...
1
vote
1
answer
40
views
Using .scale() in HTML canvas causes hit detection issues
NOTE
Here is a link to a video I made demonstrating the issue at hand on Dropbox: https://www.dropbox.com/scl/fo/p19oite64o22sh9bl8s1b/ALnUvrJzNbK7QixHrgHGgdY?rlkey=gpxahqur1kmfdqr1ulow4bk04&st=...
0
votes
0
answers
49
views
Ways to have only some collisions get resolved handled by Unity Physics, while letting all collisions be detected by code
Often, I want certain GameObjects, which I'll hereafter refer to as "entities", to exhibit the following properties: I want entities to use Unity's physics system for collision with terrain, ...
0
votes
0
answers
492
views
Collisions in Raylib C++
Im making this simple platform game on Raylib C++, and I can't nail down the collisions. I have tried to implement my own collisions:
#include "raylib.h"
#include <stdio.h>
struct ...
1
vote
1
answer
335
views
Godot4. How to detect collisions ONLY by the first iteration
I have the following problem in Godot Engine: How to detect collisions only the first iteration when Node2D enters the tree?
I'm using Area2D which is 💥 "Explosion" in my game and it has to ...
0
votes
0
answers
122
views
How to make that SAT collision algo implementation work for walls?
I wrote Separating Axis Theorem (SAT) algorithm implementation for collisions in my SFML game by one of the OneLoneCoder video tutorials on YouTube. But it doesn't work for wall colliders, the problem ...
2
votes
0
answers
43
views
How are the feet established in inverse kinematics?
So, I'm working on a game in Unity, It was a 3D game. and I was intending that the player character uses inverse kinematics and prodedural animation, and stuff like that. To be clear they don't have a ...
1
vote
1
answer
1k
views
How to implement one way collision for platforms in Godot?
I have a 2d platform game and wanted to make the player be able to jump on top of it from the bottom or diagonally from bottom-left or bottom-right. The problem I'm facing is that sometimes the player ...
1
vote
0
answers
54
views
Unity2D Mirror, OverlapCircle not detecting colliders/layermasks
I'm currently making a game prototype. This is a multiplayer rpg, but I'm currently struggling with collisions. My movement script works fine, it is a grid based movement using a move point that I &...