Code Monkey home page Code Monkey logo

Comments (3)

TheAndreLuiz avatar TheAndreLuiz commented on May 14, 2024 2

The new shape is achieved through a series of matrix multiplications. As this process can be very complex, it's not necessary to hard code it, just let the graphics/physics libraries do the calculations for you. This video explains the math, and this one is a demonstration of how to code it.

from fallingsandsurvival.

PieKing1215 avatar PieKing1215 commented on May 14, 2024

Thanks for answering @The0AnD; I'll add what I would have said as well:

It was unclear to me exactly what the original question was but assuming it was "How do you get the rigidbody to rotate due to physics?", the answer is that I used a library for the rigidbody physics engine (Box2D).

It would be an entire project of its own to make your own physics engine with similar scope to Box2D.

I'm not sure what kind of experience @xi-you has, but I would highly recommend using a preexisting physics engine library unless they really know what they're doing (Though it doesn't hurt to know about the underlying concepts, and the videos @The0AnD linked are good).

from fallingsandsurvival.

PandaDecSt avatar PandaDecSt commented on May 14, 2024

Thanks for your reply.Maybe you have some misunderstandings about my question. This is also to blame for not having a specific overview of this question. I am very sorry.

Currently I am already using Box2d physics engine.

Thank you @The0AnD for providing the link.

from fallingsandsurvival.

Related Issues (18)

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.