Member Function  Parameter  Return  Explain
getID None number  
getName None string    
setName string   None  
 getPosition None vec  
 setPosition vec None  
 getVelocity None vec  
 setVelocity vec None  
 getLastPosition None vec  
 getLastVelocity None vec  
 getMass None number  
 setMass number None  
 getResistance None number get the coefficient of resistance (default is 0)
 setResistance number None  
 getAccel None vec get acceleration
 setAccel vec None set acceleration
 getBoundingBox None bbox  
 setBoundingBox bbox None  
 getGravityScale None number 1 = 980 / S (default is 1)
 setGravityScale number None  
 getStrideHeight None number stairstep height (default is 21)
 setStrideHeight number None  
 getGradientLimit None number limit walk on too gradient bevel face.
value range is 0 ~ 1 (vertical to horizontal , default is 0.7, means 0.7 ~ 1 range can walk );
Set this value smaller, then movtar can walk on more steep surface.
 setGradientLimit number None  
 getOverBounce None number affect bounce direction. value range is 1 ~ 2,
1 means bounce direction parallel with collision plane; 2 means complete bounce, incidence angle equals reflection angle. (default is 1.01)
 setOverBounce number None  
 getBounceAtten None number velocity attenuation on bounce. value range is 0~1, 0 means complete attenuation, velocity is set to zero after bounce; 1 means no attenuation. (default is 1)
 setBounceAtten number None  
 isFreezing None boolean  
 freezing boolean None  
 isPoint None boolean  
 pointed boolean None  
 getRadius None number  
 setRadius number None  
 isStrideBlock None boolean whether enable stride block (like upstairs) (default is false)
 setStrideBlock boolean None  
 isRebound None boolean whether enable bounce velocity against original velocity ( angle > 90 ) (default is false)
 setRebound boolean None  
 isNoBounce None boolean whether disable bounce (default is false)
 setNoBounce boolean None  
getNoClipMask None dword Retrieves the noclip mask. See remark.
setNoClipMask dword None Set the noclip mask.
getStyle None dword Retrieves the style. See style list.
setStyle dword None Set the style.
 Callback Function  Parameter  Return  Explain
 OnCollide trace handle  None be executed when collision happened
Example codes:
m.OnCollide = function(ptrace)


The NoClipMask is a dword for disable clipping between particular objects. It works like Lighting Channel, assume ObjectA has Mask1, ObjectB has Mask2; If ( Mask1 bitwise-AND Mask2 ), then no clipping between ObjectA and ObjectB. For root object, it's default value is NOCLIPMASK_ROOT; for movtar, it's default value is NOCLIPMASK_MOVTAR; so all movtar will not colliding eachother by default.

you can let a movtar free through any objects by below code:

movtar.setNoClipMask( orDWORD( movtar.getNoClipMask(), NOCLIPMASK_ROOT ) )

other sample:

movtar.setNoClipMask( orDWORD( movtar.getNoClipMask(), NOCLIPMASK_MOVABLE) )  -- through all movable object

movtar.setNoClipMask( orDWORD( movtar.getNoClipMask(),  NOCLIPMASK_STATICMESH, NOCLIPMASK_MOBILE )  )   -- through all mobile and static mesh

movtar.setNoClipMask( andDWORD( movtar.getNoClipMask(), notDWORD( NOCLIPMASK_MOVTAR )  )  ) -- let movtar do colliding with other movtar

The most significant 16 bits of  NoClipMask is system field, so you can only use the low 16 bits(1~16) to custom your own clip mask.

Styles List:

MOVS_NOCLIP -- ignore collision detection
MOVS_HOLLOW -- for collision detection, movtar can get out from inner of a hollow movtar.

noclip mask

NoClip Mask:
NOCLIPMASK_ROOT                 -- root
NOCLIPMASK_MOVABLE          -- movable
NOCLIPMASK_STATICMESH      -- static mesh
NOCLIPMASK_SURFACE             -- surface
NOCLIPMASK_TERRAIN             -- terrain
NOCLIPMASK_OCEAN             -- ocean

NOCLIPMASK_MOBILE            -- mobile
NOCLIPMASK_CLOTH             -- cloth
NOCLIPMASK_SKINMESH     -- skin mesh
NOCLIPMASK_PLAYER            -- player

NOCLIPMASK_MOVTAR         -- move target