Jump to content
OpenGL API Specifications
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 25 September 2012 - 01:07 AM
Posted 25 September 2012 - 05:31 AM
In my 3D editor i have an Translation gizmo that display the direction which an object is facing. If you select the x axis for example and moved the mouse in the direction of the gizmo it follows that direction. Now the problem that i am having is that if i perform an yaw of 180 degress and the x axis ends up facing the left direction. When i select it and moved the mouse left it end up mirroring instead of moving to the left. I have found that out that my mouse coordinate which i am using as a scale factor to determines whether i moved left or right never changed. So when the x axis values end up been (-1,0,0) for example and when i move my mouse left. it takes the new mouse position and subtract from the old one, i end up with -1 for the mouse as well so when i multiply the mouse delta by the left axis it ends up flipping the axis back to positive. So what i am looking for is a way i can convert my mouse to be in the same space as my camera/object. So to sum it up, i am looking for a way for my gizmos to translate in teh direction that the arrow is pointing too no matter what the orientation of the object or the camera. If anyone can help, i would greatly appreciate it.
Posted 25 September 2012 - 10:01 AM
Posted 25 September 2012 - 05:57 PM
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.