Mouse Cursor
Blitz3D Forums/Blitz3D Programming/Mouse Cursor
| ||
Hi, me again! I've been looking thru the archives here but cannot seem to find out EXACTLY how to change the mouse cursor. Could someone plus supply some sample code. Also how can I use mousex(),mousey() and position an object in the 3d world that matches the actual mouse position... Cos that way I could use an entity for the mouse cursor. Thanks. |
| ||
Parent a sprite just infront of the camera to the camera. Then use mousexspeed and mouseyspeed to move it around x and y. divide x and y by a few numbers until it feels right. You end up with something like (totally untested)... cam=createcamera() cursor=createsprite() moveentity cursor,0,0,1 entityorder cursor,-100 repeat xx#=mousexspeed()/divide number yy#=mouseyspeed()/divide number movemouse graphicswidth()/2,graphicsheight()/2 moveentity cursor,xx,yy,0 updateworld renderworld flip until keyhit(1) |