How to set limit of appearing

Thank you @yombo . it is wokring

1 Like

You are welcome :slight_smile:

1 Like

:blush: :blush: :blush:

Still I have one doubt @yombo. If I set the target as you told. then it is not clear while rotating that. This is rotating according to the new target. is there any way to solve that.

What behaviour exactly do you want? OrbitControls always orbit around the target.

Actually I need to orbit around the center of the object. So I didn’t set the target. I left that as default(0,0,0). Because I have created the object as it has the center (0,0,0). But if I do like that. Then the zoomin option has affected. I need to zoomin after to the center of the object. But it orbit around it’s center. is it possible?

This is simply not how OrbitControls work. You zoom in on a target position. There is no way to get closer than 0.

2 Likes

you are right @EliasHasle. If I set the target at far from the center, then I can zoom At that position. But If I do like that, then the rotation will be bad. while rotation, the object won’t be at the center of the screen

Yes, because OrbitControls “orbit” around a given center point (controls.target).

2 Likes