I’m trying to limit the zoom when a button is off. When it is off limit the zoom and when it is on there is not limit for zooming.It should work as it is. limit is working when the button is off but when it is on it is not reseting the limit.
I’m using this code:
tried that. Not working. It is still set to minDistance=100, maxDistance=100. What I want is if any of this button is off then limit the zoom. That is limiting the zoom but its not being reset when the button is on.
@Tanjil_Hossain with min and max distance you limit the dolly of the camera not the zoom. If you indeed are talking about zoom and is not a confusion of concepts you should use maxZoom and minZoom assuming you are using an orthographic and not a perspective one.
If you are using a perspective camera I bet your conditional is the one failing or you never reach that piece of code. Log everything to check it:
Basically, I’m trying to limit the scrolling effect on the model. When I’m scrolling the mouse wheel it’s going inside of the model and scrolling out at a certain time shows the whole area that I don’t want.
What I want is to limit the scrolling effect. It should stay out of the building and not go inside of the building as well as zooming or dolly whatever you say should be in a limit. you can see in the video