I have done so much searching for this and it seems like no one knows how to do this, but there must be somebody who knows. I want to make an environment where a mesh needs to learn how to stay balanced.
What you want is Rigid Body Physics, this is what you should search for:
- Explanation
- Video Game Physics Tutorial - Part I: Rigid Body Dynamics | ToptalĀ®
- https://www.cs.ubc.ca/~rhodin/2020_2021_CPSC_427/lectures/D_CollisionTutorial.pdf (Best article)
- https://web.stanford.edu/class/cs248/pdf/class_09_rigid_bodies.pdf
- Video Game Physics Tutorial - Part I: Rigid Body Dynamics | ToptalĀ®
a simple search on this matter can yield up these many articles.
If you need any help or guide on anything is specific, please do tell, otherwise there are a ton of good articles on the web
This can take a while to implement from scracth, either you use a third party library, or you implement just a simpler version for your needs without the hassle of having to deal with a lot of factors