From f05923d155f48fcc576df3d5cf900a55eac0ac14 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 3 Apr 2019 19:53:52 -0700 Subject: Fixed rotations --- unityplugin/GhostCubeScene/src/GhostCubeScene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unityplugin/GhostCubeScene/src') diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp index e65d083..cbed56c 100644 --- a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp +++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp @@ -142,7 +142,7 @@ void GhostCubeScene::OnGraphicsInitialized() void GhostCubeScene::Update(double CurrTime, double ElapsedTime) { - m_CubeWorldView = scaleMatrix(1, 2, 1) * rotationY(-static_cast(CurrTime) * 2.0f) * rotationX(-PI_F * 0.3f) * translationMatrix(0.f, 0.0f, 10.0f); + m_CubeWorldView = scaleMatrix(1, 2, 1) * rotationY(static_cast(CurrTime) * 2.0f) * rotationX(PI_F * 0.3f) * translationMatrix(0.f, 0.0f, 10.0f); } @@ -199,7 +199,7 @@ void GhostCubeScene::Render(UnityRenderingEvent RenderEventFunc) pCtx->CommitShaderResources(m_pMirrorSRB, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); { - float4x4 MirrorWorldView = scaleMatrix(5,5,5) * rotationX(PI_F*0.6f) * translationMatrix(0.f, -3.0f, 10.0f); + float4x4 MirrorWorldView = scaleMatrix(5,5,5) * rotationX(-PI_F*0.6f) * translationMatrix(0.f, -3.0f, 10.0f); float NearPlane = 0.3f; float FarPlane = 1000.f; if (ReverseZ) -- cgit v1.2.3