Skip to content

Commit

Permalink
fix: camera.GetRight() was returning left
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Feb 20, 2025
1 parent 9d88627 commit 849e71a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Editor/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ void EditorComponent::Update(float dt)

if (wi::input::Down(wi::input::KEYBOARD_BUTTON_LSHIFT))
{
XMVECTOR V = XMVectorAdd(camera.GetRight() * xDif, camera.GetUp() * yDif) * 10;
XMVECTOR V = XMVectorAdd(-camera.GetRight() * xDif, camera.GetUp() * yDif) * 10;
XMFLOAT3 vec;
XMStoreFloat3(&vec, V);
editorscene.camera_target.Translate(vec);
Expand Down
2 changes: 1 addition & 1 deletion WickedEngine/wiScene_Components.h
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ namespace wi::scene
inline XMVECTOR GetEye() const { return XMLoadFloat3(&Eye); }
inline XMVECTOR GetAt() const { return XMLoadFloat3(&At); }
inline XMVECTOR GetUp() const { return XMLoadFloat3(&Up); }
inline XMVECTOR GetRight() const { return XMVector3Cross(GetAt(), GetUp()); }
inline XMVECTOR GetRight() const { return XMVector3Cross(GetUp(), GetAt()); }
inline XMMATRIX GetView() const { return XMLoadFloat4x4(&View); }
inline XMMATRIX GetInvView() const { return XMLoadFloat4x4(&InvView); }
inline XMMATRIX GetProjection() const { return XMLoadFloat4x4(&Projection); }
Expand Down

0 comments on commit 849e71a

Please sign in to comment.