Reputation: 75
now Objects move every direction. but I want to Objects move only X or Z, not Y.
I try this. but result is not good.
on MouseMove
// OBJECT SELECTED
if ( SELECTED )
{
var intersects = ray.intersectObject( PICKING_PLANE );SELECTED.position.set( intersects[ 0 ].point.x, 0, intersects[ 0 ].point.y ); /*SELECTED.position.copy( intersects[ 0 ].point.subSelf( offset ) );*/
return;
}
How can I solve this problem?
Upvotes: 0
Views: 463
Reputation: 19592
Store the Y position the object had when you started dragging it. Then apply that Y position at dragging time.
Upvotes: 1