This code has been declared by its author to be Public Domain code.
Download source code | MouseXSpeed, MouseYSpeed and MouseZSpeed by Perturbatio | 2008 |
| |
|
For help with B3D users converting to BMax |
Function MouseXSpeed:Int()
Global lastX:Int =0
Local result:Int = MouseX()-lastX
lastX = MouseX()
Return result
End Function
Function MouseYSpeed:Int()
Global lastY:Int =0
Local result:Int = MouseY()-lastY
lastY = MouseY()
Return result
End Function
Function MouseZSpeed:Int()
Global lastZ:Int =0
Local result:Int = MouseZ()-lastZ
lastZ = MouseZ()
Return result
End Function |
Comments |
Doesnt work with movemouse like the Blitz3d version does.
|
|
Add a reset flag to X/Y functions and 'overload' movemouse to also call the X/Y functions with the reset flag set.
??
|
Code Archives Forum