Comments (6)
Hey @mybmgithub,
the orbit-controls are not intended to cover this use case. This lies in the basic idea the orbit controls are built around: You orbit a target object. This means the camera is moving around a target on a circular path, always looking at the target. Say you have a target object at [0,0,0]. When you zoom in the camera it moves closer to [0,0,0], when you zoom out the camera moves farther away. It's important to know that the camera cannot be any closer to [0,0,0] than [0,0,0].
In he use-case you are describing this leads to a problem that cannot be solved with orbit-controls. You use a sky object, that is essentially just a sphere with a radius so big that it encompasses all objects in the scene, including the camera. This sphere has you panoramic texture applied on the inside so it feels like you are in a room. The sky is initially placed at [0,0,0], meaning the center of the sphere is at that position.
When you use the orbit-controls with this setup and have a target at [0,0,0] you won't be able to get the camera any closer to the sky sphere than zooming it in until it's at [0,0,0] which depending on the size of your sky might be quite far away. Due to the inner workings of orbit-controls—and the purpose it was built for—you won't be able to overcome this.
I suggest you look for other components that fit your needs better or start writing your own component that does exactly what you want to achieve. The docs on the Aframe website have a chapter on how to get started.
Sorry to be of little help with this.
Cheers
from aframe-orbit-controls-component.
Thank you tizzle for your follow-up. I will continue my search for a package that can achieve this goal or roll my own solution in the end.
from aframe-orbit-controls-component.
Hey @mybmgithub,
have you had luck finding something that suits your needs?
Cheers
Till
from aframe-orbit-controls-component.
I have not found anything else that can do this for our project. Nor have I written a Component. But, I did find a fix for another major need of pitching up and down in our project while on desktop or mobile. And for zoom, I may settle (for now) on the zoom property from the Camera and put a + and - in the UI to allow for zooming to happen. I tested zoom on the Camera and that is what I need. So, that would at least give the app the zoom feature it really should have.
from aframe-orbit-controls-component.
I'm still not sure if my component is the right tool for the task :)
Is it ok if i close this issue for now? I don't plan to implement pitch behaviour, as the orbit controls always rely on a target to look at.
Cheers
from aframe-orbit-controls-component.
Yes, please close at your discretion. I rolled my own solution. Thanks.
from aframe-orbit-controls-component.
Related Issues (20)
- feature request - inverted zoom option HOT 2
- Gyroscope while in VR HOT 3
- Unable to zoom in and out in PC or Mobile browsers HOT 2
- pointerevents for touch devices HOT 4
- Orbit controls break if using an <a-assets> container HOT 4
- README points to v0.1.8 on the CDN, but latest ver is 0.1.7 HOT 1
- I can't load the component dynamically HOT 5
- Does not work on A-Frame 0.7 HOT 6
- Check for already at desiredPosition returns false positives sometimes HOT 2
- Distance property does not seem to be working
- Listen to zoom event HOT 1
- Cant rotate around object in VR mode (Cardboard) HOT 2
- Can't rotate when obj model is rendered in wireframe HOT 4
- Issue when play is triggered after sceneEl renderstart event
- Use targets world position instead of local HOT 1
- minPolarAngle/maxPolarAngle Infinity possible? HOT 2
- Zoom need click
- Forcing the camera to go back behind the object quickly HOT 2
- Model pivot changed after using orbit controls. And model and camera's position changing affects its z and not x and y position.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aframe-orbit-controls-component.