You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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).
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.
In the question #4 , it is mentioned that the rigid body shape is recalculated when the angle of the rigid body changes.
Look at this pickaxe.
After the rigid body angle is changed, how is this shape transformation achieved?
I have not used those libraries and algorithms you mentioned.
The text was updated successfully, but these errors were encountered: