Adding a hinge door to a vehicle

Post Reply
kangaroo
Posts: 11
Joined: Wed Mar 13, 2013 10:18 pm

Adding a hinge door to a vehicle

Post by kangaroo »

Hi. I was trying to add some hinge constraints to the raycast vehicle demo, as if it was a door or a hood and the first rigid body being the chassi itself. It behaves kind of weird and also I cant set the hight at which the second body is attached to the pivot, it just ends up on the ground. Has anybody done this kind of thing? Thanks.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Adding a hinge door to a vehicle

Post by Basroil »

I think you need to look at the constraints demo.

In the case of a hinge joint, you can set the pivot point and axis using transforms that represent the distance between the two objects and the pivot (if both are the same rotation and distance, both transforms are simply negatives of each other). Just remember that the bodies are represented by their center of gravity.
kangaroo
Posts: 11
Joined: Wed Mar 13, 2013 10:18 pm

Re: Adding a hinge door to a vehicle

Post by kangaroo »

Actually it is about the same example as in the constraint demo and as long as i constrain two so to speak stand alone rigid bodis they behave as expected. But when one of them is the rigid body representing the chassi of the vehicle the behavior is getting wierd.
Post Reply