- Home /
How to stop Player from pushing heavy Rigidbody Object
The tree has a mass of 500 (very heavy) yet the player can simply move it around? Only when the tree's Rigidbody is awake, when the tree is on the ground player cannot move it.
Edit: I think I'm just going to make a Rigidbody controller..
Answer by Llama_w_2Ls · Jan 14, 2021 at 10:14 AM
Yes, as SmallLion mentioned, freezing or locking the position of the rigidbody, will not allow the object to move at all. This can be done in the constraints menu dropdown of the rigidbody component.
Another way is to set it to IsKinematic, so it can't be moved by other rigidbody objects. However, this might cause collision detection issues, especially in 2D. @NathoSteveo
Answer by NathoSteveo · Jan 14, 2021 at 10:20 AM
Freezing any or all positions does not work :^( it either sends it in the air or doesn't let the tree fall at all.. I've also tried IsKinematic which gives undesired results. my Player movement uses a CharacterController no Rigidbody btw.
Here's the setup @Llama_w_2Ls the tree
the tree code that pushes it over
I don't know why this might be happening. $$anonymous$$aybe a screenshot of your current setup in the editor or more description might help me to understand the cause of this issue?
Ah.. I saw your video just now. Didn't see the link before. If you want the player to not be able to easily move around the rigidbody when it is grounded, you should set it to IsKinematic once it's hit the floor. $$anonymous$$aybe this helps?
But you are able to move the tree when it starts to fall down, when the rigidbody IsSleeping you cannot, only when it's awake.
Setting IsKinematic will just cause it to freeze mid air :/
Whilst it's falling, the rigidbody is awake. Once it's hit the floor, didn't you want the rigidbody to not be movable anymore?
what is the mass of player?Does it has rigidbody?. Hope yes.Did u see that? https://answers.unity.com/questions/281163/freeze-position-without-rigidbody.html
Your answer
Follow this Question
Related Questions
Aircraft Control 1 Answer
Move Character Controller 0 Answers
Rigidbody step offset 1 Answer
How to make rigidbody addforce locally 1 Answer
Is there a way to make a wallrunning system using the character controller? 1 Answer