- Home /
How do you give Objects in your scene Weight and Player can push them?
Just lay a bunch of objects like boxes , rocks etc. The heaveir objects like cars, can't move but i want my character to be able to PUSH other objects.
Like if there's a heavy big box and the character(I"m doing an FPS) walks through it, the character should not be able to pass through, instead he will push it but the box will give out force and the speed of the character walking will slow down.
that's what i want to do. even if it wasn't an FPS sstyle game.
You really need to start marking your questions as "answered".
Answer by Sajidfarooq · Aug 20, 2013 at 01:36 PM
Turn the objects you want to be pushed around into rigid bodies.
Component->Physics->Rigidbody
Oh nice. Wel but that's it?
and how do i reduce the weight of the object somehow..so it's not super heavy?
and so do i have to make the player also be a rigidbody? So that i can have force and be able to push ?
Change the mass
http://docs.unity3d.com/Documentation/Components/class-Rigidbody.html
http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.html
The objects that will not move should not have a rigidbody, and should be marked as static in the transform component.
to change the mass, simply go to your object > Rigidbody > $$anonymous$$ass
You can change the mass to whatever you would like. The higher the mass, the heavier. Also, make sure you have gravity on. You can turn it on and off through the rigidbody as well. That easy!
Your answer
Follow this Question
Related Questions
How do I fake momentum transfer for collisions with a non-physics character? 0 Answers
WebGL Build bugged Colliders 0 Answers
Reading all the Collsion-Data for specific physical interactions 3 Answers
Stopping all player interactions with OnCollisionEnter? 2 Answers
How do I make my object move by exactly one in unity? 3 Answers