showing results for - "how to make 2d rigid bodies with javascript"
Gino
05 Nov 2020
1const Vec2 gravity( 0, -10.0f )
2velocity += force * (1.0f / mass + gravity) * dt
3angularVelocity += torque * (1.0f / momentOfInertia) * dt
4position += velocity * dt
5orient += angularVelocity * dt
6