Simple Crate pushing..

Im having a Brain Freeze…
Just trying to bump into a crate and have it move… cant understand what Ive done wrong, even though Ive done it many times before!

Created new Project, using basic First Person Controller, added Ridgid body to a cube… Isnt that supposed to be it??
Anyway, its colliding (Player bumps into it) but I cant get it to move with physics…!
Im sure Ive done this a hundred times before… forgetting something!!

Mark

A character controller doesn’t use physics. Usually this is good thing since your character doesn’t go flying every time he moves over a rough patch of ground. But it means that you have to explicitly move things you bump into. See OnControllerColliderHit(). The example script there is what you are looking for.

Im just going to add MY OWN ANSWER here, as I have found the correct one. Although the code that robertbu directed me to worked fine, I had the nagging feeling that the solution was simpler.

The truth is that I simply had STATIC selected on the crate/box.

So EVEN IF a character controller doesn’t use physics, its NOT true that it doesn’t have collisions, Simply add a Redid body to the thing you want to knock about, check that static is turned OFF, and bump into it to your hearts content! No Scripts no nuffing!

:slight_smile:

Mark