I just can't seem to figure this out.
I have a 3Dsprite (which is drawn by normal x,y coords, not using the usual blitz3d coords of x,y,z).. ie, the sprite is located at, say, 320x400, and will be at that pixel location on screen.
I need to rotate this 3dsprite to point at the mousepointer.
I have tried:
angle# = ATan2(MouseX() - 320,MouseY() - 400) + 90
But that doesn't quite work the way i was hoping it would (it does return an angle it seems, but if i rotate the pivot the 3d sprite is on to that angle, it screws up, it doesn't point towards the mouse pointer_).
Any ideas?
Tracer
I have a 3Dsprite (which is drawn by normal x,y coords, not using the usual blitz3d coords of x,y,z).. ie, the sprite is located at, say, 320x400, and will be at that pixel location on screen.
I need to rotate this 3dsprite to point at the mousepointer.
I have tried:
angle# = ATan2(MouseX() - 320,MouseY() - 400) + 90
But that doesn't quite work the way i was hoping it would (it does return an angle it seems, but if i rotate the pivot the 3d sprite is on to that angle, it screws up, it doesn't point towards the mouse pointer_).
Any ideas?
Tracer