From ef6792d705c8de0e14139ba5734f34fc19f08114 Mon Sep 17 00:00:00 2001 From: Mikael Klages Date: Mon, 21 Aug 2023 13:43:16 +0200 Subject: [PATCH] Fixed missing flag in HelloCube Fixed "NonUniformScale" flag missing from GetEntity call in RotationSpeedAuthoring for the HelloCube tutorial. The example runs without it due to the cube in the example scene being non-uniform and therefore gaining PostTransformMatrix, but will cause hard-to-debug issues for anyone recreating the code in the tutorial. --- .../Assets/HelloCube/Common/RotationSpeedAuthoring.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EntitiesSamples/Assets/HelloCube/Common/RotationSpeedAuthoring.cs b/EntitiesSamples/Assets/HelloCube/Common/RotationSpeedAuthoring.cs index 66c8d1f08..99f13337f 100644 --- a/EntitiesSamples/Assets/HelloCube/Common/RotationSpeedAuthoring.cs +++ b/EntitiesSamples/Assets/HelloCube/Common/RotationSpeedAuthoring.cs @@ -16,7 +16,7 @@ class Baker : Baker public override void Bake(RotationSpeedAuthoring authoring) { // The entity will be moved - var entity = GetEntity(TransformUsageFlags.Dynamic); + var entity = GetEntity(TransformUsageFlags.Dynamic | TransformUsageFlags.NonUniformScale); AddComponent(entity, new RotationSpeed { RadiansPerSecond = math.radians(authoring.DegreesPerSecond)