Giter Site home page Giter Site logo

spatial-controls's People

Contributors

vanruesc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spatial-controls's Issues

Restrict y axes to remain on floor

Is there a possibility disable Y axes angle direction? Character is flying when backward and going to deep when forward because pointer looks that direction.

How to enable damping?

Hello, do these controls have camera movement damping possibility like OrbitControls?
Thanks

How to block axis-movement?

Hi Vanruesc,

First to all, thanks for this helpful controls.
Now, I'm trying to implement this as a first person camera controls, but when I try to "walk" forward while I'm looking the down, the camera goes down and ends up getting inside the floor.
For example, in Cannon-es, we can apply something called "factor" to the "movement" as a vector3: LinearFactor
This concept applied to spatial, settings.translation.factor.set(1,0,1) wich means the movement is blocked in Y axis... giving the effect I'm trying to reach. Is like 'Sensitivity' here but giving the option to be more especific.
Idk, this can be an improvement for Sensitivity.

Is that possible here?

Controls doesn't respect camera's position and rotation after their change in the camera

Hello! Thanks for the best controls ever build in three.js world :)

I just found a thing that seems like a bug.

When I setting camera position and rotation before creating controls, everything seems to be fine. My camera in right place, look to the right place and I can control it with SpatialControls. To check this right behavior, just see the demo.

But when I change camera position and rotation after creating controls, camera position and rotation changes to default (0,0,0) and my camera teleports. To see this behavior, comment lines 27-28 and uncomment lines 32-33 in demo.

When I check controls position after setting camera's position, but before clicking on canvas and locking pointer, position in camera and controls is the same, but it changes to zeros right after I moving the mouse.

Demo: https://codepen.io/upisfree/pen/poNvdXY

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.