Comments (3)
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.
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.
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)
- Open Source? HOT 17
- Conan with cmake on linux fails
- Conan cmake error with SDL2 HOT 2
- how player collision?
- ERROR: Unable to find 'sdl_gpu/20201002@sdl_gpu/20201002' in remotes HOT 3
- Game.cpp -> WINAPI glSpeedUp -> ReleaseDC : Unhandled exception HOT 2
- FPS?
- i dont understand how to download HOT 1
- Music
- Question on rigidbodies HOT 2
- Still active? HOT 1
- Simulate each pixel with a rigid body? HOT 8
- A couple (new) questions on how you accomplish the Box2D rigidbodies in the falling sand simulation. HOT 8
- Use github workflows to build an executable whenever a release is created HOT 5
- [META] Breaking Changes Notifications HOT 3
- Add list of keyboard shortcuts HOT 1
- Create CmakeList.txt for compilation with cmake HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fallingsandsurvival.