View Full Version : Moving selected objects in OpenGL
07-28-2012, 03:52 PM
i add 3 object at same time (object a, object b,object c),now i try moving object b, who know how can move it?
07-31-2012, 02:26 PM
Are you trying to use user input with a mouse? In that case I'd say read up on picking. Here is a good article: click (http://content.gpwiki.org/index.php/OpenGL:Tutorials:Picking).
You will need to have a way to detect a mouse button down event (when you click), motion (typically "move") and when the user lets go of the mouse button. Track the pointer coordinates and covert them to your GL window coordinates.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.