0

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?

user1658740
  • 75
  • 2
  • 5

1 Answers1

1

Store the Y position the object had when you started dragging it. Then apply that Y position at dragging time.

mrdoob
  • 19,334
  • 4
  • 63
  • 62