- #1
stasb
- 4
- 0
Hi, guys!
I've managed to implement a decent enough rigid body simulator for my 2D game using my sketchy high-school physics knowledge.
Now I'm trying to pin some rigid bodies together. Connecting them with springs doesn't quite do the job. Too soft, the bodies drift apart. Too stiff, the simulation explodes. The smaller the integration timestep, the stiffer the springs I can have. What happens to linear\angular positions and velocities of two rigid bodies connected by a spring when stiffness approaches infinity and the timestep is infinitely small? Can't figure it out for the life of me, but something tells me it's a cheap solution to the problem. Any insight highly appreciated.
I've managed to implement a decent enough rigid body simulator for my 2D game using my sketchy high-school physics knowledge.
Now I'm trying to pin some rigid bodies together. Connecting them with springs doesn't quite do the job. Too soft, the bodies drift apart. Too stiff, the simulation explodes. The smaller the integration timestep, the stiffer the springs I can have. What happens to linear\angular positions and velocities of two rigid bodies connected by a spring when stiffness approaches infinity and the timestep is infinitely small? Can't figure it out for the life of me, but something tells me it's a cheap solution to the problem. Any insight highly appreciated.