Skip to main content

Questions tagged [collision-detection]

Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.

0 votes
0 answers
43 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: ...
M. R. M.'s user avatar
  • 151
0 votes
1 answer
162 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....
Erty Seidohl's user avatar
1 vote
0 answers
56 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 ...
T360's user avatar
  • 11
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 ...
Eevan's user avatar
  • 1
1 vote
1 answer
251 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 ...
Jared Kosiba's user avatar
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 ...
Ram's user avatar
  • 73
0 votes
1 answer
108 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 ...
Achie1's user avatar
  • 181
1 vote
2 answers
433 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, ...
Callumari's user avatar
1 vote
0 answers
126 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 ...
Vidde's user avatar
  • 11
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 ...
Tyler Harper's user avatar
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 ...
no good's user avatar
  • 11
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 ...
SavedowW's user avatar
1 vote
2 answers
217 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 ...
ahotpotato's user avatar
0 votes
0 answers
97 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 ...
bbqribs's user avatar
  • 13
1 vote
0 answers
84 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 ...
Daniel Hall's user avatar

15 30 50 per page
1
2 3 4 5
167