r/programminghelp • u/anasthese07 • Apr 03 '24
C++ Some 2d physics help with rotation
I'm planning on creating a simple 2d physics engine that involves shapes with various amounts of points, I can see how I can create a "world" system where each object is iteratively updated and how they interact with one another.
However I want to make it so that objects also rotate when they hit each other and not just bounce apart, as they would in real life, I don't even know where to start and how I would mathematically do this, any help on this would be appreciated
Ill probably be writing this in c++ so that's why I added the flair
View all comments
Show parent comment
1
u/anasthese07 Apr 03 '24
The goal of this simulation is simply to make it, I want to do it as a challenge that just simulates the interaction and behaviour between 2d shapes that can move around and collide with one another, resulting in a resultant force being applied and the shapes rotating based on angles, speed, etc