Constraints in bullet

eskimo456
Posts: 6
Joined: Wed Feb 15, 2012 3:26 pm

Constraints in bullet

Post by eskimo456 »

Hi there sorry if this is in the wrong part of the forum.

I am trying to allow two seperate components to be able to snap together and connect using a slider.

I have several objects that fall with gravity and are able to collide and react to each other. I cant work out how to get them to join together using a slider. I have not been able to find much information on the subject.

I am setting up a joint using

Code: Select all

sliderTest = new btSliderConstraint(*classTest.rigidBody2,*classTest.rigidBody3,classTest.transformation2,classTest.transformation3,true);
I have to rigidbodies and two seperate transformations, the objects are currently next to each other.

I then add the constraint to the world using

Code: Select all

initilisePhysics.dynamicsWorld->addConstraint(sliderTest,true);
If I load the program all the objects dont render as there x,y,z position is infinitly small. If I remove the line then everything will fall and collide correctly. Do the rigid bodies require some additional parameters? Or do I need to set up some additional parameters for it to work?

Many thanks