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
This is now fixed in the Castle Game Engine
The fixed version will be automatically available in a few hours on https://castle-engine.io/download as soon as it passes some automatic tests. You can observe this page: Comparing snapshot...master · castle-engine/castle-engine · GitHub , when it will no longer display the commit titled “Calculate and use FColliderInChildren, FRigidBodyInChildren…” then this fix is part of the official engine downloads.
When using the new engine, remove setting the InternalMovesPhysicsBodies
– this field was removed from the engine, as it is not necessary anymore for anything
1 Like