Advertisement Jump to content
Sign in to follow this  

3D Pick and Drag

This topic is 4680 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've implemented pick and drag functionality on 3d objects in my scene. Basically I can drag them along world-space x,y,z vectors and will soon implement a free roaming move along the plane perpendicular to the camera view vector. The idea I came up with is to fire two rays into the scene, one representing the last mouse position, the other is the current mouse position. Both vectors intersect the plane aligned with the direction vector I'm translating along. I then dot these two intersection points (I'm working in view space here) with that direction and take the difference. This is my translation amount. Everything works well so far. I was just wondering if there a better way to do this? BennyW [Edited by - bennyW on March 30, 2006 9:38:06 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!