SOLVED Inputting coordinates in polar vs orthographic

D

Darkwing

Guest
Is there any way to provide position data to GML in polar coordinates instead of x and y? My current code only works if the player is facing directly up, down, left, or right, due to only checking x+32 etc... is there a way to say like "32 at direction + 90 degrees" or something like that?

Thanks!
 
Last edited by a moderator:

Nidoking

Member
Well, if you're using polar coordinates, I assume you know at least some trigonometry. The lengthdir_x and lengthdir_y functions should be shortcuts for that.
 
D

Darkwing

Guest
Well, if you're using polar coordinates, I assume you know at least some trigonometry. The lengthdir_x and lengthdir_y functions should be shortcuts for that.
This is EXACTLY what I was looking for! Thank you!
 

chamaeleon

Member
Well, if you're using polar coordinates, I assume you know at least some trigonometry. The lengthdir_x and lengthdir_y functions should be shortcuts for that.
Is it really a shortcut if using the trig functions means typing less characters in total? :)
 
Top