Giter Club home page Giter Club logo

Comments (6)

tizzle avatar tizzle commented on May 23, 2024

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.

mybmgithub avatar mybmgithub commented on May 23, 2024

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.

tizzle avatar tizzle commented on May 23, 2024

Hey @mybmgithub,

have you had luck finding something that suits your needs?

Cheers

Till

from aframe-orbit-controls-component.

mybmgithub avatar mybmgithub commented on May 23, 2024

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.

tizzle avatar tizzle commented on May 23, 2024

@mybmgithub,

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.

mybmgithub avatar mybmgithub commented on May 23, 2024

Yes, please close at your discretion. I rolled my own solution. Thanks.

from aframe-orbit-controls-component.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.