-------------------------------------------------------------------------------- -- Handler.......... : onInit -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function CarDemoDynBox.onInit ( ) -------------------------------------------------------------------------------- local o = this.getObject ( ) if ( dynamics.createBoxBody ( o, this.nSX ( ), this.nSY ( ), this.nSZ ( ) ) ) then dynamics.enableDynamics ( o, true ) dynamics.enableCollisions ( o, true ) dynamics.enableGravity ( o, true ) dynamics.enableAutoIdle ( o, true ) dynamics.setAutoIdleTime ( o, 0.2 ) dynamics.setAutoIdleLinearThreshold ( o, 0.2 ) dynamics.setAutoIdleAngularThreshold( o, 0.2 ) end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------