How can I get coordinates for a position given a specified heading in degrees?
Hi Maths forum :)
The problem I have is actually for a program I am writing, I just cant figure it out though.
Let's say I have a fixed 2D cooridnate system using Y and X coords, I also have a character that can be facing in any direction. His direction is given as a heading in degrees. For example, 0° is north (Y direction), 180° is south (-Y direction) X is east...etc...
Let's say I wish to find the coordinates of a point that is directly in front of the person, no matter which way he is facing. For instance, I might want the coords for 2 units in front of the character. How would I do this? To make it more clear, if the character is facing south (180°), the position I am looking for will be (-2, 0)
Can anyonep provide an equation for this?
thanks for any answer :D Much appreciated