mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Changed Rotation from Euler to Quaternion (TransformComponent)
This commit is contained in:
@@ -16,7 +16,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
private static void UpdateEntity(Entity entity, TransformComponent* transform, EcsWorld world)
|
||||
{
|
||||
// Todo: this probably needs a rewrite as it may scale poorly with deep hierarchies!
|
||||
// Todo: test scaling with deep hierarchies!
|
||||
|
||||
// transform was updated this frame -> skip
|
||||
if(transform.Frame == _frame)
|
||||
@@ -28,8 +28,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
if(transform.IsDirty)
|
||||
{
|
||||
transform.LocalTransform = .Translation(transform.Position) * .RotationX(transform.Rotation.X) *
|
||||
.RotationY(transform.Rotation.Y) * .RotationZ(transform.Rotation.Z) * .Scaling(transform.Scale);
|
||||
transform.LocalTransform = .Translation(transform.Position) * .RotationQuaternion(transform.Rotation) * .Scaling(transform.Scale);
|
||||
|
||||
transform.IsDirty = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user