Mouselook?

Blitz3D Forums/Blitz3D Beginners Area/Mouselook?

Polarix(Posted 2016) [#1]
I have a pretty good mouselook code already but... I go up when i look up! is there anyway to stop this? thanks




RustyKristi(Posted 2016) [#2]
I have the same mouselook as yours but mine works ok, so post a full basic example maybe I can help.


Polarix(Posted 2016) [#3]



RustyKristi(Posted 2016) [#4]
Simple, just flush your mouse input before game loop


FlushMouse
While Not KeyHit(1)
...



RemiD(Posted 2016) [#5]
Alternatively, if you want the player to be able to look up/down and to look turn left/right but when he moves forward/backward or left/right it is not dependent on the view orientation (like in fps games with humanoids), take a look at this code :



(the interactionmode is to be able to lock/unlock the mouse so that you can interact in 2d with a GUI/menu or in 3d by controlling the camera view)