hello,
This is a general question of how to manipulate 3D objects with the
mouse on 2D screen ?
I've a default scene, with the centre in the middle of the screen.
I've created a room, with the floor in the positive xz-plane.
now I've objects on the ceiling, that can move and rotate in the xz-plane.
I project both the mouse position and the objects to the floor,
and then calculate the angles and move or rotate the object.
Sometimes this works great, but sometimes the movement seems to be
opposite to where my mouse is going,
especially the rotation behaves strange.
For rotating the following strategy works quit well, but seems very
unnatural to me:
- click the object to select it for rotation (around a fixed axis),
- move the cursor far away, moving in the direction away from the object
and thus from the axis of ration and from the center of the screen
- then move the mouse around the rotation point
Are there better methods ?
Maybe some websites ?
thanks,
Stef Mientki
|