You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compare the two lines of code below. The first one is from Transform::SetRotation, and the second one is from Transform::Rotate.
The first one seem to work how I expect quaternion multiplication to work. I.e. inverse multiplication, or childRotation * parentRotation to have the parent rotation applied first. From what I can tell, the second one seems to flip this concept though, and applies the rotation delta before it applies the current rotation. Is this a bug or am I just a bit slow today?
Compare the two lines of code below. The first one is from
Transform::SetRotation
, and the second one is fromTransform::Rotate
.The first one seem to work how I expect quaternion multiplication to work. I.e. inverse multiplication, or
childRotation * parentRotation
to have the parent rotation applied first. From what I can tell, the second one seems to flip this concept though, and applies the rotation delta before it applies the current rotation. Is this a bug or am I just a bit slow today?SpartanEngine/runtime/World/Components/Transform.cpp
Line 153 in 383e6da
SetRotationLocal(!HasParent() ? rotation : rotation * GetParent()->GetRotation().Inverse());
SpartanEngine/runtime/World/Components/Transform.cpp
Line 208 in 383e6da
SetRotationLocal((m_rotation_local * delta).Normalized());
The text was updated successfully, but these errors were encountered: