I can't rotate this box

Hello, I have the following scene


And I wrote this in my code
if Event.IsKey(keyA) then
begin
//VelocidadRotacion := 0.1;
Tablero.Rotation:=Vector4(0,0,1,Pi/2);
WritelnLog(Tablero.Rotation.ToString);
Exit(True);
end;

But When I press key A, nothings happen. Even I can see in the log, that the TCastletransform (Tablero) has a new values in the rotation field.
What am I doing wrong?

Thanks

/BlueIcaro

P…D I uploaded the code here: GitHub - Blueicaro/CastleGameEngineQuestion

Thanks for the clear bugreport!

It’s a bug in Castle Game Engine – I noticed it already some time ago. Didn’t fix it yet, though there is a workaround: set Tablero.InternalMovesPhysicsBodies := true; at any point (for example in TViewMain.Start).

It occurs when you change transformation of a parent TCastleTransform (Tablero in this case) that has children TCastleTransform with rigid bodies.

I will bump the priority of this – we should just fix it, and remove the need for InternalMovesPhysicsBodies. I’ll let here know.

1 Like

Thank you!