Questions tagged [collision-detection]
Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.
19 questions from the last 365 days
0
votes
1
answer
41
views
Capsule collision sticking in mirrored section of level
I have a problem with importing a 3D model from Blender into Godot 4. I created my apartment model in Blender and exported it as a .glb file into Godot 4.5. I generate the CollisionShape3D using Mesh →...
0
votes
0
answers
45
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
169
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....
0
votes
0
answers
89
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
271
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
111
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
486
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
134
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
64
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
212
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
228
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
102
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
88
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 ...
0
votes
2
answers
207
views
How can I detect collision between a box and a minimum poly collision mesh?
Mostly a C++ newbie, trying to do a 3D game in Raylib.
I have a set of fairly irregular meshes that I'd like to see if a box collider has penetrated. For this project, a fairly high level of accuracy ...
0
votes
1
answer
126
views
How do I get a 3D collision with a Heightmap in Raylib?
I'm presently trying to do a sorta Starfox clone with Raylib, using the heightmap example here: https://www.raylib.com/examples/models/loader.html?name=models_heightmap
In order to handle collision in ...
0
votes
0
answers
26
views
Friction not applied in fast collisions using Continuous collision detection modes
Starting in Unity 2022.3 versions, this started happening -
In my scenario, I have a ball bouncing on a surface (e.g on concrete) and no matter what the friction values are, the ball basically ignores ...
0
votes
1
answer
87
views
How to destroy/remove Texture after collision in java box2d
I'm coding a simple Arkanoid/Breakout game and have problems with removing the bricks. I'm able to destroy the body but the texture is still there. I'm a beginner so is there a simple way to remove it ...