Pushing a box

Right, where would we be if we didn’t push boxes in this medium?

Anyways, this is quite easy. I am using the first person controller and I want it to be able to move a box with rigidbody physics. Now, how do I do that?

  1. Add rigidbody and box collider to box.
  2. Make animation to what you want to move the box for the character
  3. Make animation play when moving box or pressing a button to play the animation.
    Done. :slight_smile:

Another solution could be to add a script to your character controller along the lines of this:

function OnCollisionStay(other : Collision) {

if (other.rigidbody != null) {
other.rigidbody.WakeUp();
}

}

You can also use rigidbody.AddRelativeForce(vector3) to move the player. Mass is kind of acceleration, drag is kind of max speed.

for character controller and rigidbodies you will need to use OnControllerColliderHit

Woah, this is heavy to me. (A bit new to scripts. Currently using uScript)

Tried what Steffan said, but with no success.
(Added the script to the CharacterMotor script)

Does your character controller have a rigidbody, as well as your “box”?

Well, I can easily add it. Why?

Because all moving objects need Rigidbodies to move. :slight_smile: