Physics/Cannon: Strange behavior creating composite impostors with LockJoints

Hi all!

This is a followup of Physics: How to control rotational inertia of compound bodies?

I’m trying to compose a physical body consisting of a couple of impostors connected by LockJoints. While translation of the resp. parts works well, it seems to be impossible to rotate them. Somehow rotation seems to also be ‘locked’.

Playground: Babylon.js Playground

Is it somehow possible to construct with rotated meshes?

(notice: I need to construct like that for I need each part to have it’s own mass, friction and restitution in a flight sim. Wheels have other friction than wings :). I’d prefer using parenting, but this only allows for single mass, friction and restitution values for the compound object as a whole.)

Adding 2 physics masters : @RaananW and @Cedric :slight_smile:

Indeed! Scaling works fine but the rotation doesn’t. It looks like a bug to me. I’m taking a closer look.

3 Likes

This is a known (and old issue) actually Lock constraint always aligns rotation of the 2 bodies? · Issue #225 · schteppe/cannon.js · GitHub
It’s fixed in master but not in the build

1 Like