Fixed scripting engine crash and improved transformation system

This commit is contained in:
Antoine Pilote
2023-03-05 18:19:41 -05:00
parent 435d50e655
commit b1edeb387f
11 changed files with 99 additions and 32 deletions

View File

@@ -20,7 +20,7 @@ namespace Nuake
void TransformComponent::SetLocalRotation(const Quat& quat)
{
Rotation = quat;
Rotation = normalize(quat);
Dirty = true;
}
@@ -89,8 +89,6 @@ namespace Nuake
void TransformComponent::SetGlobalTransform(const Matrix4& transform)
{
GlobalTransform = transform;
GlobalTranslation = Vector3(transform[3]);
}
Matrix4 TransformComponent::GetLocalTransform() const
@@ -101,6 +99,5 @@ namespace Nuake
void TransformComponent::SetLocalTransform(const Matrix4& transform)
{
LocalTransform = transform;
Translation = Vector3(transform[3]);
}
}