a stupid cam problem..
Blitz3D Forums/Blitz3D Programming/a stupid cam problem..
| ||
hey, ok i have this wierd problem with CameraZoom.. i want to zoom the cam when shift is pressed and MouseZSpeed() changes.. so i use this.. (there are 4 cams on the screen btw.).. If KeyDown(42) Then CAM1_ZoomValue#=CAM1_ZoomValue# + MouseZSpeed() CameraZoom CAM1,CAM1_ZoomValue# End If ok this works .. BUT.. if i dont hold SHIFT but scroll with the mouse scroller.. and then press SHIFT (after i stopped scrolling) the camera zooms.. i dont know why it zooms but it does.. there was no way CAM1_ZoomValue# could change without holding SHIFT.. so any ides why it zooms suddendly after scrolling without holding shift? |
| ||
MouseZSpeed delivers the last speed measured. try this: if keydown blaba zoom etc else dummy#=cameraZSpeed() endif or use Flushmouse |
| ||
do this:zspeed=MouseZSpeed() If KeyDown(42) and zspeed CAM1_ZoomValue#=CAM1_ZoomValue# + zspeed CameraZoom CAM1,CAM1_ZoomValue# End If |
| ||
uh yeah, that's the correct way for all those mouse values: grab them one time and then use the variable. This way the speed is read each loop too. |
| ||
thank you.. that works :-) |