Hello,
For a 3d editor i am trying to include 3d manipulators move, rotate, and scale. Now i have the manipulators drawing and i can detect whether the user has clicked on one or not, and which of the axis the user has selected. The only problem i am having is actually manipulating the object itself i cant figure out how to translate the mouse movement into 3d movement. This is what i have come up with for now this is just the code for the x axis:
selectedObject.x += delta.X * speed/(float)gameTime.ElapsedGameTime.TotalMilliseconds;
//update gizmo position
Gizmo3D.Position = selectedObject.Position;
But now when i move something it looks like the object doesn't move along with the mouse. In this video
you can see that the movement is really direct to the object.
What should i do to make manipulating objects more direct and precise.
Thanks in advance,
[Edited by - slayeriq on February 9, 2010 5:44:26 PM]