fixed physics.applyGravity()