Basic Collision issues

So I built a set of walls as suggested. The issue is that they are in contact so as soon as the game runs, they fly apart, so I can’t get to them to test collision detection.

No problem, I’ll just check the “fix position” and “fix rotation” box. Now they stay still, but I can pass straight through them. In fact, when I’m partway through, it flings me out the other side.

I made a single cube obstacle and it works fine, so I know the physics and box colliders work fine.

Update: I made several of the obstacles, and then scaled them to make walls and had the same issues. I can either have solid walls that get moved about, or fixed ones where the collision detection works.

Any ideas??

Sounds like there are rigidbodies on the walls. They don’t need it since they’re walls. As long as one object - the player - has a rigidbody, the collisions should work. Can you share a screenshot of the walls and their colliders? Perhaps the player, too

No rigidbodies on walls.


I fixed it (sorta). Turning off the fixed rotation and “is kinematic” made it behave, except now I glitch either over or under the walls. It’s an improvement…

This part. The cubes will not fly apart if there is no rigidbody attached to them. Colliders don’t interact with each other if there’s no rigidbody attached to at least one of them.

I assume these are ‘freeze position’ and ‘freeze rotation’. Those are on a rigidbody.

Everything in your first post suggests there are rigidbodies on the walls, or at least one of them that touches a bunch of others.

Also, I meant screenshots of the objects, not the inspector. That’s my bad for not being more specific

Hi
I did briefly try out rigidbodies on the walls to see if that fixed it, but it did not. I then removed them.
This meant that collisions would not work.
As I mentioned above, I unchecked a couple of things on the player settings, and it worked.
It’s all fine now.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms