Giter Site home page Giter Site logo

Comments (6)

chandlerprall avatar chandlerprall commented on July 18, 2024

What are you trying to accomplish with the rotation? Not sure I fully understand you're question.

from physijs.

fireph avatar fireph commented on July 18, 2024

camera.physics object is a physijs object and I want to set the angular velocity of this object. The problem is let's say I want to set the rotation to be "up" relative to the camera's position and rotation. This doesn't seem to work correctly with my current implementation and I was wondering if there is an easier way to do this with physijs or if you have any idea how to do it better (possibly adding a setRelativeAngularVelocity() and getRelativeAngularVelocity() would be awesome).

In summary, I'm just trying to rotate the camera using a physijs object that the camera is tied to. So I'm setting the angular velocity of the physijs object and then the camera follows the position and angle of that physijs object.

from physijs.

chandlerprall avatar chandlerprall commented on July 18, 2024

I apologize for taking so long to get back to you on this. I put together an example of how to convert an angular velocity from the object's local frame into world coordinates. Relevant code starts on line 49.

from physijs.

fireph avatar fireph commented on July 18, 2024

Thank you so much, this worked perfectly!

from physijs.

shawnwhinnery avatar shawnwhinnery commented on July 18, 2024

Bummer that link is dead.

from physijs.

kellycode avatar kellycode commented on July 18, 2024

Maybe this one, but it seems broken atm: http://www.chandlerprall.com/labs/Physijs/examples/relative_velocity.html

from physijs.

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.