Talk:Lateral Velocity

From Robowiki
Revision as of 05:33, 21 March 2010 by Voidious (talk | contribs) (reply)
Jump to navigation Jump to search

I don't understand how the equation works.. Could anyone explain this to me in terms of triangles? What does e.getHeadingRadians() - enemyAbsBearing give? How can you explain it?

---- urgood2 04:25, 21 March 2010 (UTC)

Well, e.getHeadingRadians() is the enemy's heading relative to the battle field - 0 is pointing up, Math.PI / 2 (90 degrees) is right, Math.PI (180 degrees) is down. The enemyAbsBearing variable is the angle from your bot to the enemy bot. So the difference is the enemy's heading relative to yours - 0 is facing directly away from you, Math.PI / 2 is exactly perpendicular to you (clockwise), etc. Having trouble thinking of some triangles that would demonstrate the formula, probably because it's late on a Saturday night... But hopefully that helps. --Voidious 04:33, 21 March 2010 (UTC)