Posted By: rtsgamer706
mouse_pos3D - 09/29/13 14:29
Hi, I am making a top down game with twin stick type controls. I am using the following lines to make the player character look at the mouse cursor:
It works fine except for the fact that once I move from x=0, y=0 it doesn't work any more.
I think it's because the command I'm using checks the cursor's position in relation to the origin.
But I don't understand it in depth enough to know hwo to fix it.
Is there a way that I can either chose the reference point as something I can move dynamically.
Or is there another command or something that'll fit my needs better?
Thanks
Code:
while (my) { vec_to_angle (my.pan,mouse_pos3d); my.tilt = 0; }
It works fine except for the fact that once I move from x=0, y=0 it doesn't work any more.
I think it's because the command I'm using checks the cursor's position in relation to the origin.
But I don't understand it in depth enough to know hwo to fix it.
Is there a way that I can either chose the reference point as something I can move dynamically.
Or is there another command or something that'll fit my needs better?
Thanks