[Solved] Hold a physic object


I want to hold a initial physical block in place and connect other blocks/servos/motors to it to construct a robot. My first attend was to give the first block the mass 0f. But set the mass later has no effect anymore. Is there way to achive this. With bullet there is a hinge constraint to hold a block in place and release it later.

Another idea was a dummy sphere, place it in the center of the first block and set a hinge constraint and turn off collision for this hinge. Maybe thats the way?!

When I release the robot, I will put a plan under its feed :wink:

Any ideas?


I found a solution:

hold1 = new HingeConstraint(hubPhy1.getObjectId(), new javax.vecmath.Vector3f(1,0,0), new javax.vecmath.Vector3f(0,0,1));
hold2 = new HingeConstraint(hubPhy1.getObjectId(), new javax.vecmath.Vector3f(-1,0,0), new javax.vecmath.Vector3f(0,0,1));

But looks a little ugly in my opinion. But that way I can hold the initial block and release it later. Still hope there is a better more elegant solution.


You could use setKinematic(true);

1 Like

Ok I’ll give it a try :slight_smile: I suppose I can set it to false later to release it.

Many thanks

works! thanks a lot :slight_smile: