Prevent Rigidbody Pushing

Tester115

Member
Hello,

I have the UFPM package and I currently have a physics issue. I have an object with a Rigidbody that needs to be affected by gravity but should not be able to be pushed around by the Nolan character. increasing the mass of the object makes no difference nor does decreasing the mass of Nolan. Is there a way to keep this object non kinematic while not being able to be pushed?

Edit: I've also found that that increasing mass only works if the object in question is on the default layer. My game is doing some things that require multiple layers, but I might be able to set some things to default if there is no other solution.
 
Last edited:
You should put the object on a physics layer that doesn't collide with the player's. E.g. if the player is on the Player layer and the object is on the GravityOnly layer, then disable collisions between the Player and GravityOnly layers in your project's collision matrix, found at the bottom of the project Physics settings.
 
You should also make sure that the layer this object is on, is not included in the character's Collider Layer Mask (under "Collisions") or its Solid Object Layers in the Character Layer Manager.
 
Hmm okay, well yeah.. But it work too good then, I want them to just not give each other physics , but collide, and just don't move ?
 
The object shouldn't have a Rigidbody then, just a collider. Without a Rigidbody there will be no forces applied upon collision (apart from any bounce/friction settings on the character).
 
The object is an enemy ai with ragdoll. But I manage to deal with it in another way! Remember to check out my game on work in progress!
 
Top