Fixed scripting engine crash and improved transformation system
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user