How to clamp some properties of an arcRotateCamera target?

When you have to zoom + unzoom + pan on a large area, you quickly get your camera flipped upside down, due to the fact that the target finally moves too far from the visual target:

So I tried something to clamp target Y to 0:

  • this looks like to add a latency to the user inputs, so it’s probably not a right way to do?
  • is there also a way to clamp this y value to the visual center targetted mesh face y position? (not sure if this is understandable :smiley:) = 0; works fine for me

alternatively, you can update the panningAxis to 1,0,1, but i feel like this gives an odd speed difference between x and z panning

Erf, simplicity is the truth, again :smiley:

1 Like