Rigid body costraint hinge

In the image you can see a sort of bridge. How can I set this costraint or use another method to make it fall rotation around the hinge when hit with sufficient force?


Hmmm. That I will have to test.

Another suggestion is that you use a collision sensor (or near sensor combined with collision) that tests for velocity. Then, based on that, it will play an ipo that will make the bridge fall.


How can i test velocity with this sensor?

is there a way to get, via python the velocity of the actor to use it with other things? I would like to use it to control the sound

Note that I’m using servo control, not linear velocity

No ideas? :rolleyes::rolleyes:

It should work with a rigid body joint (hinge, 6DOF), just set the pivot at the right position and turn off collisions witht the parent. If the bridge leans just a bit back it will have to be hit by sufficient force to tip it over

Checking the force of the impact is a bit more tricky as the velocity of an object is already updated to its new value when the collision sensor triggers, 2 options I can think of:
-Store the object speed in a property and only update it when there is no collision, this way you can get the speed before the collision.
-Make a slightly larger ghost object, which is hit just before the collsion with the bridge, get the object velocity when the object hits the ghost shape, just before hitting the bridge

I’ll try the first, but how does the second funtion?

I tried get.linearvelocity and then event print it to the console, but it always prints 0 0 0. I am using servo control

How can I save it to the properties?

You mean like this:


Bridge.blend (142 KB)