[Pogamut-list] Rotation toLocation

jacob.schrum pogamut-forum at diana.ms.mff.cuni.cz
Wed Jul 11 06:10:18 CEST 2012


Rotation toLocation

Author: jacob.schrum

The JavaDoc is pretty unclear as to exactly what the toLocation method in Rotation is doing. This might be the method I need, but let me instead describe what I want and then hopefully someone can tell me the easiest way to do it.

Given the bot's current rotation, I want to get a Location that is exactly X distance units in front of the bot along its line of sight. I was hoping that there was a method that would turn the Rotation into a vector whose origin was the bot, and that pointed in the direction it was facing, since then I could simply scale and add this vector to the bot's Location.

Are there already some methods in place that will make this easy, or do I need to do some vector math to figure this out?

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=6&comments_parentId=1007#form>




More information about the Pogamut-list mailing list