How to prevent particular object from zoom in /out

Hi All,

I have many objects in scene . while mouse scroll up and down all objects are zooming up / down . I want to prevent this functionality for particular objects . These objects scale should not get affected while other objects are responsive for zoom in/out while mouse scroll up/down.

Is it possible ?

Thanks in advance.

If zooming is implemented as dollying (like when using OrbitControls with a perspective camera), you just have to ensure that non-zooming objects maintain a fixed distance from the camera. So compute the distance for each non-zooming object once, store it and then offset the objects with their distance from the camera’s current position along the camera’s look direction.

2 Likes
 <OrbitControls enableZoom={false} />