How to limit the max pan distance? #1501
Unanswered
AlexanderProd
asked this question in
Q&A
Replies: 1 comment 3 replies
-
If you know how it works in threejs then it's the same thing, controls.current in your example is the original THREE.MapControls One thing that is a little odd, why is the map controls jsx element uppercase? That indicates a component, where does it come from? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How can I clamp the maximum panning distance with MapControls?
Even though that seems like an easy question I'm having a hard time successfully implementing it.
There are some examples out there on how to do it with Three.js but I'm not sure how to translate it to r3f.
I already have this Controls Component but I'm not sure how to do the actual clamping of the X and Y panning distance.
Thanks for your help
Alex
Beta Was this translation helpful? Give feedback.
All reactions