Thanks, Kyall, for such a useful post! Now I see what are the benefits of using plain coordinates instead of angles to represent direction of where to go to. There's no need to recalculate direction when you can just sum it up to already existing coordinates in order to move requested entity. Simple yet satisfying.
Anyway, could somebody still prove why this is true to deepen my understanding (and possibly the other's following this topic):
[source lang="c++"]result.x = cos( direction.x ) * magnitude - sin( direction.y ) * magnituderesult.y = sin( direction.x ) * magnitude + cos( direction.y ) * magnitude[/source]
Henri KorpelaMember Since 20 Nov 2011
Offline Last Active Nov 16 2012 02:38 PM
- Group Members
- Active Posts 5
- Profile Views 664
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
Henri Korpela hasn't added any contacts yet.