Entity/SetPhysicParams

From Blue Mars Developer Guidebook

Jump to: navigation, search


This is an Entity function

Contents

Overview

Function

SetPhysicParams(paramtype,params)
set physics parameters of entity
paramtype - one of the physical parameters listed below
params - a table of key-value pairs, according to the paramtype

Examples

  • Game/Scripts/Entities/Physics/RigidBodyEx.lua

Tips

References

CryPhysics Programming Guide

Parameters

PHYSICPARAM_FLAGS

flags_mask 
integer - default -
flags 
integer - same as entity flags default -

PHYSICPARAM_PARTICLE

flags 
integer - same as entity flags default -
mass 
float - default -
size 
float - pseudo-radius default -
heading 
vector - direction of movement default -
initial_velocity 
float - velocity along heading default -
k_air_resistance 
float - air resistance coefficient, F=kv default -
k_water_resistance 
float - water resistance coefficient default -
acc_thrust 
float - acceleration along direction of movement default -
acc_lift 
{{{p9type}}} - acceleration that lifts particle with the current speed default - {{{p9default}}}
min_bounce_vel 
{{{p10type}}} - {{{p10doc}}} default - {{{p10default}}}
surface_idx 
integer - {{{p11doc}}} default - {{{p11default}}}
pierceability 
{{{p12type}}} - an integer default - {{{p12default}}}
normal 
vector - {{{p13doc}}} default - {{{p13default}}}
vector - angular velocity default - {{{p14default}}}
gravity 
vector - {{{p15doc}}} default - {{{p15default}}}
water_gravity 
vector - gravity in water default - {{{p16default}}}
collider_to_ignore 
{{{p17type}}} - entity to ignore during collisions default - {{{p17default}}}
constant_orientation 
{{{p18type}}} - particles maintain constant orientation - overrides flags default - {{{p18default}}}

PHYSICPARAM_VEHICLE

axle_friction 
float - default -
engine_power 
float - default -
max_steer 
float - default -
engine_maxRPM 
float - default -
intergration_type 
integer - default -
max_time_step_vehicle 
float - default -
sleep_speed_vehicle 
float - default -
damping_vehicle 
float - default -
max_braking_friction 
float - default -
engine_minRPM 
float - default -
engine_idleRPM 
float - default -
engine_shiftupRPM 
float - default -
engine_shiftdownRPM 
float - default -
stabilizer 
float - default -
clutch_speed 
float - default -
gears 
table - default -
brake_torque 
float - default -
dyn_friction_ratio 
float - default -
gear_dir_switch_RPM 
float - default -
minGear 
integer - default -
maxGear 
integer - default -

PHYSICPARAM_WHEEL

wheel 
integer - default -
is_driving 
integer - default -
susp_len 
float - default -
min_friction 
float - default -
max_friction 
float - default -
surface_idx 
integer - default -
can_brake 
integer - default -

PHYSICPARAM_SIMULATION

Some of these values are exposed as properties in physics entities and described in the CryEngine2 Manuals on doc.crymod.com


max_time_step 
float - interval between physics updates default -
sleep_speed 
float - default -
gravity 
vector - default - {x=0,y=0,z=-9.8}
gravityx 
float - x component of gravity vector default -
gravityy 
float - y component of gravity vector default -
gravityz 
float - z component of gravity vector default -
freefall_gravity 
vector - gravity used when there are no collisions default - gravity
freefall_gravityx 
float - x component of freefall gravity vector default -
freefall_gravityy 
float - y component of freefall gravity vector default -
freefall_gravityz 
float - z component of freefall gravity vector default -
damping 
float - default -
freefall_damping 
float - damping used when there are no collisions default -
softness 
float - default -
angular_softness 
float - default -
softness_group 
float - default -
mass 
float - mass of the entity (equals volume multiplied by density) default -
density 
float - density of the entity, affects bouyancy in water and collisions default -
min_energy 
float - minimum energy (divided by mass) below which entity falls asleep default -
max_logged_collisions 
integer - default - 1
bFixedDamping 
boolean - default - false
bUseSimpleSolver 
boolean - default - false

PHYSICPARAM_ARTICULATED

lying_mode_ncolls 
integer - default -
lying_gravity 
vector - default -
lying_gravityx 
float - default -
lying_gravityy 
float - default -
lying_gravityz 
float - default -
lying_damping 
float - default -
lying_sleep_speed 
float - default -
is_grounded 
integer - default -
sim_type 
integer - default -
lying_sim_type 
integer - default -
expand_hinges 
integer - default -

PHYSICPARAM_JOINT

bone_name 
string - default -
min 
vector - default -
max 
vector - default -
stiffness 
vector - default -
damping 
vector - default -
dashpot 
vector - default -
kdashpot 
vector - default -

PHYSICPARAM_ROPE

length 
float - default -
mass 
float - default -
coll_dist 
float - default -
surface_idx 
integer - default -
friction 
float - default -
friction_pull 
float - default -
wind_variance 
float - default -
air_resistance 
float - default -
sensor_size 
float - default -
max_force 
float - default -
num_segs 
integer - default -
num_subvtx 
integer - default -
pose_stiffness 
float - default -
pose_damping 
float - default -
pose_type 
integer - default -
wind 
vector - default -
entity_phys_id 
integer - default -
entity_name 
string - default -
entity_part_id 
integer - default -
end 
vector - default -
entity_phys_id_2 
integer - default -
entity_name_2 
string - default -
entity_phys_id_1 
integer - default -
entity_name_1 
string - default -
bCheckCollisions 
integer - default -
bCheckTerrainCollisions 
integer - default -
bCheckAttachmentCollisions 
integer - default -
bShootable 
integer - default -

PHYSICPARAM_SOFTBODY

thickness 
float - default -
max_safe_step 
float - default -
hardness 
float - default -
damping_ratio 
float - default -
air_resistance 
float - default -
wind 
vector - default -
wind_variance 
float - default -
max_iters 
integer - default -
accuracy 
float - default -
friction 
float - default -
impulse_scale 
float - default -
explosion_scale 
float - default -
collision_impulse_scale 
float - default -
max_collision_impulse 
float - default -
collision_mask 
integer - default -
mass_decay 
float - default -

PHYSICPARAM_BUOYANCY

water_density 
float - default -
water_damping 
float - default -
water_resistance 
float - default -
water_sleep_speed 
float - default -
water_normal 
vector - default -
water_origin 
vector - default -

PHYSICPARAM_CONSTRAINT

phys_entity_id 
integer - default -
entity_part_id1 
integer - default -
entity_part_id2 
integer - default -
pivot 
vector - default -
frame0 
vector - default -
frame0_inner 
vector - default -
frame1 
vector - default -
frame1_inner 
vector - default -
ignore_buddy 
integer - default -
xmin 
float - default -
xmax 
float - default -
zmin 
float - default -
zmax 
float - default -
damping 
float - default -
max_pull_force 
float - default -
max_bend_torque 
float - default -

PHYSICPARAM_REMOVE_CONSTRAINT

id 
integer - default -

PHYSICPARAM_PLAYERDYN

k_inertia 
float - default - {{{p1default}}}
k_air_control 
float - default - {{{p2default}}}
gravity 
float - default - {{{p3default}}}
bSwimming 
int - default - {{{p4default}}}
mass 
float - default - {{{p5default}}}
surface_idx 
int - default - {{{p6default}}}
is_active 
int - default - {{{p7default}}}
max_vel_ground 
float - default - {{{p8default}}}

PHYSICPARAM_PLAYERDIM

pivot_height 
float - default -
eye_height 
float - default -
cyl_r 
float - radius of collider cylinder default -
cyl_pos 
float - vertical position of collider cylinder default -

PHYSICPARAM_VELOCITY

vector - velocity default - zero vector
vector - rotational velocity default - zero vector

PHYSICPARAM_PART_FLAGS

flags_mask 
integer - default -
flags 
integer - default -
flags_collider_mask 
integer - default -
flags_collider 
integer - default -
mat_breakable 
integer - default -
partid 
integer - default -

PHYSICPARAM_SUPPORT_LATTICE

max_simultaneous_cracks 
integer - default -
max_push_force 
float - default -
max_pull_force 
float - default -
max_shift_force 
float - default -
max_twist_torque 
float - default -
max_bend_torque 
float - default -
crack_weaken 
float - default -
density 
float - default -

PHYSICPARAM_GROUND_PLANE

plane_index 
integer - default -
origin 
vector - default -
normal 
vector - default -

PHYSICPARAM_FOREIGNDATA

foreigndata 
integer - default -

PHYSICPARAM_AUTO_DETACHMENT

threshold 
float - default -
detach_distance 
float - default -

Flags

pre pef_pushable_by_players pef_cannot_squash_players pef_monitor_state_changes pef_never_affect_triggers pef_fixed_damping pef_ignore_areas

lef_push_objects lef_push_players

particle_single_contact particle_constant_orientation particle_no_roll particle_no_path_alignment particle_no_spin

pef_traceable pef_never_break ref_use_simple_solver particle_traceable

lef_snap_velocities pef_disabled /pre

pre rope_collides rope_traceable rope_subdivide_segs /pre

Geometry flags

pre geom_colltype_ray geom_colltype3 geom_collides geom_floats geom_colltype0 geom_colltype_player geom_colltype_explosion geom_colltype_foliage_proxy /pre

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools