-------------------------------------------------------------------------------- -- Function......... : updateGravity -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function Car.updateGravity ( ) -------------------------------------------------------------------------------- local force = math.min ( 40, dynamics.getLinearSpeed ( this.getObject ( ) ) ) * 250 dynamics.addConstantForce ( this.getObject ( ), 0, -force, 0, object.kGlobalSpace ) -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------