more camera movement

This commit is contained in:
Asuro
2025-02-12 02:01:39 +01:00
parent 03aecb6d44
commit 137d8fa539
6 changed files with 56 additions and 6 deletions

View File

@@ -7,6 +7,8 @@ struct SharedWindowData
int32_t WindowWidth = 1920;
int32_t WindowHeight = 1080;
bool HeldScanCodes[512]{0};
float MouseDeltaX = 0.0f;
float MouseDeltaY = 0.0f;
};
struct FileChangeNotification

View File

@@ -57,6 +57,9 @@ void EngineWindow::Update(SharedWindowData& shared)
}
case SDL_EVENT_MOUSE_MOTION:
{
shared.MouseDeltaX += evt.motion.xrel;
shared.MouseDeltaY += evt.motion.yrel;
break;
}
default:
break;