Abhi
0
Q:

how to make 2d rigid bodies with javascript

const Vec2 gravity( 0, -10.0f )
velocity += force * (1.0f / mass + gravity) * dt
angularVelocity += torque * (1.0f / momentOfInertia) * dt
position += velocity * dt
orient += angularVelocity * dt
0

New to Communities?

Join the community