setKinematicSpatial with Animation [SOLVED]

Dear experts,

I am trying to find a way how to perform action with doors.

Currently I implemented two animations, which do open and close door.
Then I realized the RigidBodyControl applied to the door does not change its position.

Then I found the method setKinematicSpatial, but it also does not work.
Does it just never work with animation or it is me who misses something?
Here is my code:

RigidBodyControl innerDoorPhy = new RigidBodyControl(0f);

// This does not work whenever it is false or true
//    innerDoorPhy.setKinematic(true);

How do you usually implenent it? The door should have 3 states: locked, opened, closed.
Locked shoult not open by click, otherwise it should close if opened or open if closed

1 Like

Im not sure an animation is the way to do a door.

Only static objects have a mass of 0.


Hi Mitm,

thanks a lot for help. I have found these threads before, was just wondering as animations seemed to me also to rotate the spatial. But probably finding out how to apply animation bone rotation to rigid body attached is more complicated as just attach an AbstractControl to spatial and make it rotate by specific action.

Thanks again!

1 Like