-------------------------------------------------------------------------------- -- Function......... : setupDynamics -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function Crate.setupDynamics ( ) -------------------------------------------------------------------------------- local o = this.getObject ( ) if ( dynamics.createBoxBody ( o, 1, 1, 1 ) ) then dynamics.enableCollisions ( o, true ) dynamics.enableGravity ( o, true ) dynamics.enableDynamics ( o, true ) dynamics.enableAutoIdle ( o, true ) end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------