Answer the question
In order to leave comments, you need to log in
How to rotate objects in threejs using mouse?
Let's say I have 3 cubes on the same canvas that I want to rotate. Is it possible to make a rotation of a particular object? Or is it possible to rotate only the camera? to make 3 rotating objects will i need to create 3 separate scenes?
Answer the question
In order to leave comments, you need to log in
You can, but you will need to manually try to determine what kind of object you are going to rotate.
For example, you can divide the screen into 3 areas, cover them with transparent elements, and already hang mouse listeners on them, which will rotate objects.
Or, option 2: hang one listener, but analyze the coordinate by X, determine which of the thirds of the screen it hit when the drag was started - rotate that object and rotate it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question