Code Monkey home page Code Monkey logo

Comments (3)

yoanlcq avatar yoanlcq commented on August 15, 2024 3

This fix is now published in 0.9.7 :)

from vek.

yoanlcq avatar yoanlcq commented on August 15, 2024 1

Hi,

Very interesting question! :)

Well, my reasoning was that, the only time handedness matters is when coordinates are mapped from your space (LH or RH) to your graphics API's NDC (Normalized Device Coordinates).
Because look_at does not define such a mapping (it's supposedly a "your-space"-to-"your-space" mapping), handedness would not matter.
To me, it would be like, for instance, basic translation/rotation/scale: They are defined relatively to X, Y or Z, regardless of handedness.

... But the thing I failed to notice was that look_at, though such a translation/rotation combination, is not actually defined relatively to absolute axii. Rather, look_at is usually called this way :

look_at(position, position + forward, up);

... and that forward vector implies a dependency on handedness, because it changes with it. Oops.

So I was wrong, and should've followed GLM's example. :) What I'm going to do is make look_at_lh and look_at_rh public, and deprecate look_at. If your code "worked" when flipping the forward vector (assuming the given example), then that's definitely where your problem is coming from.

Anyways, thanks for reporting this. I very much appreciate it. :)
My next commit will close this issue, but feel free to leave other comments or reopen if you still have problems.

from vek.

sunjay avatar sunjay commented on August 15, 2024

Thank you for your explanation! Yes, flipping my forward vector did in fact fix the issue, so it's exactly as you described. Could you release a new version so I can start using this right away? Thank you again :)

from vek.

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.