Attaching a joint to a bodyless object

bizack

18-11-2008 20:08:35

I believe this is possible. I have a box with a geometry without a body that I've created so that it's motionless. I have subsequent boxes (falling from the sky) that I'd like to attach to one another with a PistonJoint. My problem is correctly detecting a collision between the motionless/bodyless box (which is at ground level) and the first box I'd like to attach to it. My collision method checks for objects with bodies, and connects them with a PistonJoint. I don't quite understand how to attach an object with a body to a an object without a body. Right now the first box falling from the sky falls through the bodyless box and then 'pops' up to the defined lowstop and highstop parameters. I'd like the first falling box to obviously collide with the bodyless box and then attach a PistonJoint. Where is my error? I can include the code if this isn't clear.

Thanks.

bizack

18-11-2008 21:31:51

Never mind. Impossible, and the wrong approach. The correct approach is to have a bodyless ground, and then attach the first box to the ground with a PistonJoint with no low or high stop and anchoring at the origin. The following boxes attach to this box with a PistonJoint with calculated low and high stops.

Thanks.