   Control of movement of an object on another plane...
  Suppose the screen represents the XY-plane, and I want to use mouse to control a moving model on the XZ-plane.I know the mouse functions, but I am really confused of the matrix rotations/transformations....LOLIs there other ways round? Or can you give me some easy to understand online how-tos on this??A Billion Thanks.....Dick.   
  Your question is a little hard to follow. Are you saying that the default X-Y projection is not what you want? If that's the case, then a simple solution is to create a camera matrix that points down the Y axis. Using that you can perform the transform to create a forced X-Z projection.   ;Quote:Original post by SchmedlyYour question is a little hard to follow. Are you saying that the default X-Y projection is not what you want? If that's the case, then a simple solution is to create a camera matrix that points down the Y axis. Using that you can perform the transform to create a forced X-Z projection.Umm.......Maybe I use a diagram to explain the case...There is an object on the XZ plane, and it is restricted to move horizontally on the plane. I want to let user use the mouse to control the movement of the object.....How can I do it??I know I need to use the passive motion thing of OpenGL, but must I use matrix transformation to get the object's next coordinate??Thanks in advance.....   ;  I think I understand what you mean:are you trying to create a manipulation widget in a 3D package by any chance?If that is the kind of thing you are doing then there is a flaw in the example you gave of the camera being xy and the plane being xz: xz is exactly perpendicular to xy which means it projects as a horizontal line across the middle of the screen, and the 2D mouse movement cannot be transformed to a depth component along xz, so no 3D point.What I do with my widget is only allow it to apply transform to planes whose normals are less than about 80degrees from the camera z axis.If this is what you are doing then I will give you more detail on how I do it (if needed).   ;Quote:Original post by bluntmanO... I think that's what I want....Thanks, please provide with details.   ;  Well what I do to work out movement along the plane is to do a couple of line->plane intersects. Firsly project the mouse coodinates at its current position and its last position, which gives 2 points. Take the vectors created from the camera center to these points which gives 2 lines. Intersect these vectors on the movement plane of the object, which gives 2 more points, and calculate the distance between them along the axis you are moving.