Mouse Vel & UpdateInput called from SBApplication
This commit is contained in:
parent
aef3e4ef1a
commit
3c58a538ae
|
@ -118,6 +118,7 @@ namespace Sandbox
|
||||||
while (!window.WindowShouldClose())
|
while (!window.WindowShouldClose())
|
||||||
{
|
{
|
||||||
SHFrameRateController::UpdateFRC();
|
SHFrameRateController::UpdateFRC();
|
||||||
|
SHInputManager::UpdateInput(SHFrameRateController::GetRawDeltaTime());
|
||||||
SHSceneManager::UpdateSceneManager();
|
SHSceneManager::UpdateSceneManager();
|
||||||
SHSceneManager::SceneUpdate(1/60.0f);
|
SHSceneManager::SceneUpdate(1/60.0f);
|
||||||
//#ifdef SHEDITOR
|
//#ifdef SHEDITOR
|
||||||
|
|
|
@ -112,6 +112,10 @@ namespace SHADE
|
||||||
mouseScreenX = p.x;
|
mouseScreenX = p.x;
|
||||||
mouseScreenY = p.y;
|
mouseScreenY = p.y;
|
||||||
|
|
||||||
|
//Velocity
|
||||||
|
mouseVelocityX = static_cast<double>(mouseScreenX - mouseScreenXLast) / dt;
|
||||||
|
mouseVelocityY = static_cast<double>(mouseScreenY - mouseScreenYLast) / dt;
|
||||||
|
|
||||||
//Mouse wheel vertical delta updating
|
//Mouse wheel vertical delta updating
|
||||||
mouseWheelVerticalDelta = 0;
|
mouseWheelVerticalDelta = 0;
|
||||||
mouseWheelVerticalDelta = mouseWheelVerticalDeltaPoll;
|
mouseWheelVerticalDelta = mouseWheelVerticalDeltaPoll;
|
||||||
|
|
Loading…
Reference in New Issue