Questions tagged [collider]
Colliders are geometric proxies used in collision detection. Colliders are usually simple shapes (e.g. spheres, boxes, capsules, and their 2D counterparts) that work best with collision detection algorithms compared to the high-poly 3D meshes they approximate alone or combined.
183 questions
0
votes
2
answers
105
views
When should an object with a collider have a rigidbody?
I had some questions about Physics / Rigidbody in Unity.
I have a 2D sprite with a collider. The 2D sprite is simply a card that I place on a table with the mouse. I use the collider for raycasting (...
0
votes
0
answers
77
views
Wheel collider making my car jump in Unity
I’m making a racing game in Unity and every time the car touches the ground, it just jumps. I’ve seen people complaining about it multiple times, but usually adding mass of about 2000 to the car or ...
0
votes
1
answer
139
views
Why is my player not colliding with animated obstacles?
I can't figure this out. My obstacles have a basic box collider on them and my player has a rigidbody based controller and collsion detection is set to Continous and when obstacle hits him it just ...
0
votes
2
answers
149
views
two colliders for same trigger are conflicting
I'm trying to detext when player goes inside and exit this house.
As the picture shows I need two colliders because the house is not an exact rectangle.
So I added two box colliders to an empty ...
0
votes
0
answers
458
views
Collision between a sprite and a rect in PyGame
I'm trying to make a simple platformer game, which has code to move the camera towards a player as they jump around.
Now I have two classes: one for the player, and one for the platform.
In the ...
0
votes
1
answer
379
views
The bottom of the player capsule collider is going into the ground box collider
The bottom part of the player capsule collider is going inside the ground collider. I am using a raycast for detecting whether the plauer is grounded; an object (sphere) that is present on the bottom ...
1
vote
1
answer
2k
views
_ready(): Node not found: "Pivot/Camera" + player falls through the floor
I'm relatively new to Godot 4.0.3. I have two problems which seem to depend on each other so I put both of them into one single question.
I know, these issues have been reported multiple times on ...
0
votes
0
answers
129
views
Physics2D.OverlapBoxAll misses small overlap
I have a tetris-like 2D game with tiles, each made up of a sprite, a Rigidbody2D and a BoxCollider2D.
The tiles fall from the ...
0
votes
1
answer
167
views
Physics.CheckSphere not accounting for changes to object transform
My current project is a turn-based board game in Unity. Here is what I am trying to accomplish and the issue I am having:
In Start, I generate the board, then populate the surrounding area with ...
0
votes
0
answers
152
views
Box Collider on terrain trees activate far from the actual collider
The trees are prefabs but are placed as terrain trees. There is a space ship that explodes when hits the tree. The moment I got the screenshot is the moment that the ship collides with terrain (the ...
0
votes
2
answers
2k
views
How to deal damage every 2 seconds while enemy is touching the player, rather than every frame?
I have made an up and down movement RPG prototype and I wanted to have a fighting system.
I made it so that the enemy follows the player and that I get damage every time he collides with me. The ...
15
votes
4
answers
3k
views
Solving obtuse interior corner collisions
I'm having some trouble solving collisions in obtuse interior corners.
In the above image, the black circle is the initial position, the red is the projected movement (straight into the corner), the ...
0
votes
1
answer
1k
views
Collider overlap is not being detected
I am writing some logic to handle spawning objects into a game scene at a randomly generated location based on the size of a collider's bounds. The logic for getting the coordinates and instantiating ...
0
votes
0
answers
216
views
Possible to completely deactivate a RigidBody 2D component so that the Composite Collider on a parent object works?
In my Unity game, I have two GameObjects with the tag "Animal": Snake and Tiger, nested like so:.
Snake
Tiger
I have a Composite Collider 2D/RigidBody 2D on both the parent GameObject (...
0
votes
1
answer
1k
views
Why doesn't MeshCollider work in a build?
I have MeshColliders in my scene that are shaped like an hourglass and it works perfectly fine in the editor. However, once I build on XCode and test on my iPhone, ...
0
votes
0
answers
117
views
How to display the Composite Collider to a player
I have a GameObject with a Composite Collider on it. There are 2 nested GameObjects under it, each with a Sprite:
I am making an educational game, and for pedagogical reasons I'd like to display the ...
0
votes
1
answer
824
views
I have a "Floating Capsule Collider" setup, but if Collider stands on the edge of a platform, the player Mesh ends up looking 'stuck'
I have a "Floating Capsule Collider" setup, but it has an issue when the Collider stands on the very edge of a platform-- the player Mesh ends up looking 'stuck' inside of the platform. How ...
0
votes
1
answer
292
views
Godot KinematicBody2D Invisible After If Statement
The reason I address this question is because of the limited documentation and support for starting devs on Godot. I do not know what is wrong with this one if statement, but after I added it, my ...
1
vote
1
answer
792
views
My sprite is hovering slightly above my tilemap in Unity 2D
I have a simple object with a Rigidbody 2D and a Box Collider 2d, that's supposed to fall and land on a tilemap with a static <...
2
votes
0
answers
1k
views
No Collision while rotating. Object rotating with Rigidbody.Rotate passes through other collider
I'm working on a 3D game, and having issues with the colliders.
My Cube Controller has movement input by keyboard, with collider and rigidbody components.
Cylinder objects have basic colliders and ...
0
votes
1
answer
418
views
My First Person Player Capsule Is Always About 6 inches Under The Floor
Here is the problem. This is the exterior of the hallway in which my player capsule is standing. Notice the bottom of the capsule poking through the floor.
This is the interior of the hallway, notice ...
0
votes
1
answer
164
views
BoxCollider2D used as reference to Collide with GameObjects but it uses the original size Sprites size to Collide
I'm a beginner in Unity and pretty much copy and pasted the code but I can't figure out why the game is using the size of the sprite and not my BoxCollider2D as a ...
0
votes
3
answers
1k
views
Why am I getting Null Reference Exception inspite of checking if the Object is not null to execute something
Hi I am just trying to convert a simple flappy bird game into multiplayer game.
So In the multiplayer game using Photon , I want the bird to collide with the ground or pipe but not with the enemy bird ...
0
votes
0
answers
36
views
What are the tradeoffs I should consider when choosing how to track whether a GameObject is out of bounds? (Unity 3D)
The obvious ways are to either:
OnTriggerExit for a box collider which wraps the stage bounds
OnTriggerEnter for 6 flat box colliders surrounding the stage
I suppose, to start, 6 flat boundaries ...
0
votes
1
answer
349
views
Why does OnTriggerEnter2D/OnCollisionEnter2D work when there is no other collider object opposite?
my bullet:
There is a Box collider (checked "is Trigger")
It has Rigidbody2D (Gravity = 0, freeze rotation Z)
https://i.sstatic.net/ik1IY.jpg
I added the "OnTriggerEnter2D" ...