Disable orbitcontrols on specific objects

Hello Everyone,

Is there any way to disable orbitcontrols manual rotation on a specific object?
In other words, I want the orbitcontrols to be applied on a specific mesh and not on the scene camera.

Thank you

That is not what OrbitControls is intended for. Seems you need something like this:

2 Likes

You may be interested in this thread

3 Likes

the first part, disabling, yes, by listening to events: gltf simple example (forked) - CodeSandbox this one disables orbit when you click the transform objects which are also just meshes. this is react but the logic would be the same. listen to events, then switch on/off the controls you like.

as for enabling orbit controls only on a mesh, just enable them on pointer over and disable on pointer out.

1 Like