Mouse Vel & UpdateInput called from SBApplication

This commit is contained in:
mushgunAX 2022-10-01 18:02:27 +08:00
parent aef3e4ef1a
commit 3c58a538ae
2 changed files with 5 additions and 0 deletions

View File

@ -118,6 +118,7 @@ namespace Sandbox
while (!window.WindowShouldClose())
{
SHFrameRateController::UpdateFRC();
SHInputManager::UpdateInput(SHFrameRateController::GetRawDeltaTime());
SHSceneManager::UpdateSceneManager();
SHSceneManager::SceneUpdate(1/60.0f);
//#ifdef SHEDITOR

View File

@ -112,6 +112,10 @@ namespace SHADE
mouseScreenX = p.x;
mouseScreenY = p.y;
//Velocity
mouseVelocityX = static_cast<double>(mouseScreenX - mouseScreenXLast) / dt;
mouseVelocityY = static_cast<double>(mouseScreenY - mouseScreenYLast) / dt;
//Mouse wheel vertical delta updating
mouseWheelVerticalDelta = 0;
mouseWheelVerticalDelta = mouseWheelVerticalDeltaPoll;