Physics.IgnoreCollision Freeze x,y,z position

Hello All,

Been playing with it and I was able to ignore collision on 2 colliders.

Is there a way to ignore collision on multiple objects using only one ignorecollision

Physics.IgnoreCollision(collider1, rest of collider)

Right now I have 5 ignore collision scripts on one of the moving object and is ignoring all the collision properly.

Also, what I noticed was when my FPS hit this moving obstacle, the position moved (on x axis). The obstacle has a rigidbody and rotation is set to freeze. Should I just increase the mass of the obstacle (FPS mass == 0.5. obstacle mass = 1.0) or freeze the position? If freeze the position on x,y,z, How do I do that?

sorry for being a newbie. :slight_smile:

Thanks,
Ray

At the moment you need to call Physics.IgnoreCollider for every combination of two colliders that you want to prevent from colliding.

Not exactly sure, but why does your animated object have a rigidbody? Maybe it should be made kinematic, so that it won’t be affected by physics.

A higher mass obviously will make it be less affected if you run into it with your first person controller.

Does that mean that later, Unity will be able to ignore collisions on multiple colliders?

Tried is kinematic = true; but the obstacle will hit some outer walls(With colliders) and it will just go thru. If I make the outer walls rigid, those walls will fall off.

cool.

Thanks,
Ray