Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrbitControls: Add panLimits #30605

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

marekjedrzejewski
Copy link
Contributor

Description

This PR adds simple x, y, z constraints to panning.

Use case below:
before:

panNoLimits-2025-02-22_13.51.57_1.mp4

after:

panLimits-2025-02-22_13.54.39_1.mp4

When I tried to add this one outside of OrbitControls I wasn't able to get result like here, and as I'm probably not the only one with such use case, so here goes PR. And if I got this totally wrong, and there is a way to do it without this modification, let me know ;)

This contribution is funded by 41set

Lets you define "invisible walls" you'll bump onto when panning
Optional chaining is not supported in es2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant