Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
CScriptBindEntity::Physicalize Method
Syntax
C++
int Physicalize(IFunctionHandler * pH, int nSlot, int nPhysicsType, SmartScriptTable physicsParams);
Parameters 
Description 
int nSlot 
Slot identifier, if -1 use geometries from all slots. 
int nPhysicsType 
Type of physical entity to create. 
SmartScriptTable physicsParams 
Table with physicalization parameters.
 

inertia Inertia coefficient, the more it is, the less inertia is; 0 means no inertia air_resistance Air control coefficient 0..1, 1 - special value (total control of movement) gravity Vertical gravity magnitude. mass Mass of the player (in kg). min_slide_angle If surface slope is more than this angle, player starts sliding (In radians) max_climb_angle Player cannot climb surface which slope is steeper than this angle (In radians) max_jump_angle Player is not allowed to jump towards ground if this angle is exceeded (In radians) min_fall_angle Player starts falling when slope is steeper than this (In radians) max_vel_ground Player cannot stand on surfaces that are moving faster than this (In radians)  

 

Area table keys 
Meaning 
type 
Type of the area, valid values are: AREA_SPHERE,AREA_BOX,AREA_GEOMETRY,AREA_SHAPE 
radius 
Radius of the area sphere, must be specified if type is AREA_SPHERE. 
box_min 
Min vector of bounding box, must be specified if type is AREA_BOX. 
box_max 
Max vector of bounding box, must be specified if type is AREA_BOX.. 
points 
Table, indexed collection of vectors in local entity space defining 2D shape of the area, (AREA_SHAPE) 
height 
Height of the 2D area (AREA_SHAPE), relative to the minimal Z in the points table. 
uniform 
Same direction in every point or always point to the center. 
falloff 
ellipsoidal falloff dimensions; 0,0,0 if no falloff. 
gravity 
Gravity vector inside the physical area. 
Copyright (c) 2012. All rights reserved.