Questions tagged [collision-detection]
Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.
2,498 questions
0 votes
0 answers
44 views
How to detect which physics body of skeletal mesh has overlapped?
I have a skeletal mesh with a Physics Asset assigned to it as such: This skeletal mesh is used within an ACharacter with collision settings as such: And an actor which has the overlap event as such: ...
0 votes
1 answer
168 views
Spawn enemy in empty space
I'm new to Godot and following a tutorial, which spawns enemies randomly. However, I'm trying to improve on this by checking that the enemies don't spawn on top of the player and cause an instant loss....
1 vote
0 answers
58 views
Colliders not in the same collision layers stopping each other from moving
I'm creating a space sandbox game (godot 4.5), and the core of my building system is attaching parts together to create assemblies. Each assembly is one rigidbody3D that contains all the parts. Since ...
0 votes
0 answers
88 views
Why does a colliding object immediately disappear?
I'm trying to make an enemy collide with collision tiles in GML. I don't think there should be anything wrong with it; it compiles, but every time the enemy either immediately disappears, or just ...
1 vote
1 answer
255 views
How to speed up collision detection if there are hundreds of objects?
Let's say I have like 500 Asteroids and I'm using SAT to determine whether a collision with the Spaceship object has happened. This would require an insane amount of CPU cycles, so it makes sense to ...
7 votes
1 answer
1k views
Why are collision manifold points created inside objects instead of on their surfaces?
Suppose you have two overlapping spheres \$A\$ and \$B\$, with centers \$c_{A}\$ and \$c_{B}\$ and radii \$r_{A}\$ and \$r_{B}\$. Let \$n = \operatorname{normalize}(c_{B} - c_{A})\$ be the collision ...
0 votes
1 answer
109 views
OnTriggerEnter called without a Rigidbody
I use Unity and the player controller in the game is acting strangely. It has a Character Controller but no Rigidbody. I use CharacterController.Move to make him ...
1 vote
2 answers
466 views
How do I implement the "collide and slide" algorithm in Unity?
I've recently been attempting (and failing) to create my own character controller for my 3D Unity game for around a week. I hate the Unity rigidbody physics system for making a character controller, ...
1 vote
0 answers
130 views
Original pacman hitboxes and cornering
I have been working on (somewhat) faithfully reimplementing pacman as a sideproject and means of better learning the rust framework Bevy. However, there is one part that I really cannot quite get my ...
1 vote
1 answer
63 views
CapsuleCollider2D hitbox fails to trigger when player/enemy are stationary
I'm currently working on my first game in Unity, and I'm having some trouble with attacking. Currently, I have a game object with a 2D capsule collider child. When the attack button is pressed, the ...
1 vote
0 answers
116 views
How can I address multiple collisions within a single frame?
So, in my breakout clone, I've encountered issues where the ball will sometimes phase through bricks and the borders if it collides with one and then immediately collides with another after. My guess ...
1 vote
1 answer
208 views
Collision detection and physics in a 2d pixel platformer
I'm reworking physics in a 2d action platformer I'm developing (no engine, c++ / sdl). Here's the general movement logic for all characters: I calculate the offset I need to apply to the character I ...
1 vote
2 answers
223 views
How do you resolve collisions between two oriented bounding boxes?
I'm working on a 3D physics engine, and I'm trying to implement OBB/OBB collision detection. I was able to find Bullet's implementation here, that I'm trying to adapt. However, I still want to know ...
0 votes
0 answers
99 views
BSP partitions too small for effective collision detection
I wrote a BSP tree generation that takes a level mesh (basically a few thousand triangles), and creates a BSP tree. The generation seems to work, but when I traverse the tree, some splitting planes ...
1 vote
0 answers
87 views
How to handle collision events in games with multiple interactive objects?
I'm developing a 2D game where multiple types of objects interact with each other through collisions. Currently, I'm using pygame.spritecollide() to detect ...