Code Monkey home page Code Monkey logo

arcball-cpp's People

Contributors

dov avatar twinklebear 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

Watchers

 avatar  avatar  avatar

arcball-cpp's Issues

Panning is not tracking center

What I did:

I modified example.cpp as follows:

  1. Changed the cube to a half cube, by cutting away z>0, or in another word all the z=1 coordinates, I made them 0. This makes the original center be exactly in the middle of the visible half-cube.
  2. Changed the eye to (0,0,5)
  3. Change the angle in the glm::perspective() from 65° to 8°.
  4. Compile and run example
  5. Place the mouse cursor in the center of the (half-)cube
  6. Press mouse button and drag

What happened:

The moving of the cube is much faster than the moving of the mouse and the center of the cube quickly escapes from the mouse.

What I expect to happen:

Since center is at (0,0,0) and the center of the half cube is also at (0,0,0) I would expect that while panning the center of the cube will remain under the center of the mouse.

Comments:

I've been trying to solve this on my own, but I still haven't understood what exactly is wrong, however, is is bothering me that in your panning routine don't take into account the projection matrix.

If I were to solve this, I will make a pull request, but I would be more than pleased if you can solve this.

Thanks a lot for arc-ball!

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.