Salman Ullah Khan
Salman Ullah Khan

Reputation: 728

Drag to change position of a 3D model object in Three.js scene

I am using an example of three.js in which I can rotate, zoom in and zoom out the 3D object but I need to change its position by dragging. I am stuck in this for a very long time any help would be appreciated.

here is the link of example:

http://public.manuelwieser.com/female_croupier_2013-03-26.htm

Upvotes: 0

Views: 2081

Answers (1)

Khawer Zeshan
Khawer Zeshan

Reputation: 9646

You can check on mousedown if it intersects with object. If it does intersect we will drag the object. If it does not intersect we will rotate.

FIDDLE

Upvotes: 2

Related Questions