Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some other questions about rigid body simulation. #5

Closed
PandaDecSt opened this issue Sep 22, 2020 · 3 comments
Closed

Some other questions about rigid body simulation. #5

PandaDecSt opened this issue Sep 22, 2020 · 3 comments
Labels
question Further information is requested

Comments

@PandaDecSt
Copy link

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.
IMG_20200919_092635
IMG_20200919_092538
IMG_20200919_092616

After the rigid body angle is changed, how is this shape transformation achieved?
I have not used those libraries and algorithms you mentioned.

@PieKing1215 PieKing1215 added the question Further information is requested label Sep 22, 2020
@TheAndreLuiz
Copy link

TheAndreLuiz commented Sep 22, 2020

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.

@PieKing1215
Copy link
Owner

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).

@PandaDecSt
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants