Hello,
My game’s camera can be zoomed in and out, and it collides with the environment so it won’t go through walls I’ve designated as those layers. If I proceed to zoom the camera further out while it is against a wall, it will stay in place but keep note of the distance the camera should be at so that when it is no longer occluded it will return to the distance it is supposed to be at.
However when it is against a wall and I zoom the camera in, it will jump forwards, and then readjust itself back to being against the wall because it realises that the actual distance of the camera is not closer than its previous position. I’m trying to get the camera to function as close as possible to the way World of Warcraft does it, where when the camera rests against a wall, it doesn’t move at all when zooming unless the zoom distance is shorter than the current distance.
Below is a clip to illustrate the problem I’m having, in the clip, my camera is occluded and resting against a wall, and when I zoom in it will move forwards then move back to the wall until I’ve zoomed in enough to where the zoom distance is closer than the wall it was against.
The teleporting is just because I didn’t have zoom damping when recording this, however even with that on it still jumps the camera forward.