Posts: 77
Threads: 9
Joined: Oct 2010
Reputation:
0
Hy, anyone can help me? I want to make a mouse system calculated from CameraFrontVector's changes, but i don't know how to do the calculations...
Any functions? Or anything else?
Posts: 25
Threads: 0
Joined: Feb 2009
Reputation:
0
Could you explain a bit more about what you're trying to do?
Do you want to be able to click on the ground or on a player/vehicle or anything in 3D space?
Posts: 77
Threads: 9
Joined: Oct 2010
Reputation:
0
I'm trying to make a textdraw-mouse with an TXD mouse...
Posts: 25
Threads: 0
Joined: Feb 2009
Reputation:
0
It is possible but it's complicated.
You need to get the player camera vector, I've checked the values it gives, when you look completely up, it gives 0.707106 (to the sky) and completely down (to the ground) it gives -0.964372 as Z coordinates. You need this to set the Y coordinates for the textdraw, on 0.707106 the mouse is at the edge above in the screen, and on -0.96 its at the edge below of the screen.
for the X coordinates of the textdraw you need to use the X and Y coordinates of the camera vector. This is more complicated because you can turn the camera all around, looking north gives X=0 and Y=1, East gives X=1 and Y =0, South is X=0 and Y=-1 and West gives X=-1 and Y = 0.
The calculation about checking in what direction it changed (to find the X for the textdraw) is quite complicated...
Posts: 77
Threads: 9
Joined: Oct 2010
Reputation:
0
Thank you i'll check your post at saturday...
Posts: 77
Threads: 9
Joined: Oct 2010
Reputation:
0
There's any function that help?