Topple over physics object

Hey Guys

In my scene I’ve got 2 cliffs seperated by a gap, on one side I have a tree and I’m trying to make this tree tip over when pushed by the player so it can bridge between the gap and the player can cross.

I’m able to push the tree off the edge fine, however I’m unable to tip the tree over, I’ve tried using a hinge joint and I also have my objects ‘Centre of Mass’ set to the bottom of the object.

I’ve discovered that placing the object right on the very edge of the cliff will make it automatically tip when the game begins, however this isn’t quite the same as having the playerinteract to make this happen.

I’m sure many people have tried this and its worked perfectly fine but for me it doesn’t appear to work the way I’ve intended.

If I’ve explained it badly heres an example from another game of a similar thing: Let's Play LIMBO e.02 pushing trees down but not strong enough to kill spiderman - YouTube

Limbo uses animation, not physics for this effect. You should create a tree falling animation and then play it once your code detects the player’s trying to push the tree.

PhysX is probably too random to allow this kind of effect. The animation would never be the same and what could happen is the tree’d fall to a different place and block the path.

Edit: But if you want to use Physics anyways, you could put it on the edge, just as you described and set it to kinematic. Then, use OnCollisionEnter on the tree to detect collision with the player. Once the player touches the tree, turn it to dynamic (non-kinematic).

–David–