editor: translator Z axis fix

This commit is contained in:
Turánszki János
2022-09-02 19:40:56 +02:00
parent 63bf1a3b3d
commit b8bb07234e
+1 -1
View File
@@ -362,7 +362,7 @@ void Translator::Update(const CameraComponent& camera, const wi::Canvas& canvas)
else if (state == TRANSLATOR_Z)
{
XMVECTOR axis = XMVectorSet(0, 0, 1, 0);
XMVECTOR wrong = XMVector3Cross(camera.GetUp(), axis);
XMVECTOR wrong = XMVector3Cross(camera.GetAt(), axis);
planeNormal = XMVector3Cross(wrong, axis);
this->axis = XMFLOAT3(0, 0, 1);
}