Jump to content
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 07 March 2014 - 02:45 AM
Posted 07 March 2014 - 03:27 AM
Get the up, right and lookat vector of the camera and tanslate the object along these axis (you move it in camera space), eg
objectPosition += right * mouseDeltaX + up * mouseDeltaY + lookat *mouseDeltaZ
(mouseDeltaZ could be the mousewheel movement)
For rotation take a look at arc-ball rotation.
Posted 07 March 2014 - 06:56 AM
What I generally do is use the camera forward vector as a ray.
Intersect this ray with the ground plane, and move the selected object to this point.
You can see this in action here ...
And if I want move Up or Down, I just change Plane position? Looks nice, now just need to get Plane
Edited by Plutonium, 07 March 2014 - 06:56 AM.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.