Weightless Prismatic Joint

Hi,

I have a prismatic joint at a 30 degree angle which I need to make weightless (i.e. not to be affected by the game physics). I attempted to add a motor to the joint to compensate for the gravity but this doesn't work. The joint either sinks or floats so I guess my calc is wrong.

Could someone suggest a method to fix this?

I did attempt to change the object to kinematic rather than dynamic but the joint no longer works.

Thanks.

Original thread: https://box2d.org/forum/viewtopic.php?t=6798