PhysicsServer

Inherits: Object

Inherited By: PhysicsServerSW

Category: Core

Brief Description

Member Functions

void area_add_shape ( RID area, RID shape, Transform transform=null )
void area_attach_object_instance_id ( RID area, int id )
void area_clear_shapes ( RID area )
RID area_create ( )
int area_get_object_instance_id ( RID area ) const
Variant area_get_param ( RID area, int param ) const
RID area_get_shape ( RID area, int shape_idx ) const
int area_get_shape_count ( RID area ) const
Transform area_get_shape_transform ( RID area, int shape_idx ) const
RID area_get_space ( RID area ) const
int area_get_space_override_mode ( RID area ) const
Transform area_get_transform ( RID area ) const
bool area_is_ray_pickable ( RID area ) const
void area_remove_shape ( RID area, int shape_idx )
void area_set_collision_layer ( RID area, int layer )
void area_set_collision_mask ( RID area, int mask )
void area_set_monitor_callback ( RID area, Object receiver, String method )
void area_set_param ( RID area, int param, Variant value )
void area_set_ray_pickable ( RID area, bool enable )
void area_set_shape ( RID area, int shape_idx, RID shape )
void area_set_shape_transform ( RID area, int shape_idx, Transform transform )
void area_set_space ( RID area, RID space )
void area_set_space_override_mode ( RID area, int mode )
void area_set_transform ( RID area, Transform transform )
void body_add_collision_exception ( RID body, RID excepted_body )
void body_add_shape ( RID body, RID shape, Transform transform=null )
void body_apply_impulse ( RID body, Vector3 pos, Vector3 impulse )
void body_apply_torque_impulse ( RID body, Vector3 impulse )
void body_attach_object_instance_id ( RID body, int id )
void body_clear_shapes ( RID body )
RID body_create ( int mode=false, bool init_sleeping=2 )
int body_get_axis_lock ( RID body ) const
int body_get_collision_layer ( RID body ) const
int body_get_collision_mask ( RID body ) const
int body_get_max_contacts_reported ( RID body ) const
int body_get_mode ( RID body ) const
int body_get_object_instance_id ( RID body ) const
float body_get_param ( RID body, int param ) const
RID body_get_shape ( RID body, int shape_idx ) const
int body_get_shape_count ( RID body ) const
Transform body_get_shape_transform ( RID body, int shape_idx ) const
RID body_get_space ( RID body ) const
Variant body_get_state ( RID body, int state ) const
bool body_is_continuous_collision_detection_enabled ( RID body ) const
bool body_is_omitting_force_integration ( RID body ) const
bool body_is_ray_pickable ( RID body ) const
void body_remove_collision_exception ( RID body, RID excepted_body )
void body_remove_shape ( RID body, int shape_idx )
void body_set_axis_lock ( RID body, int axis )
void body_set_axis_velocity ( RID body, Vector3 axis_velocity )
void body_set_collision_layer ( RID body, int layer )
void body_set_collision_mask ( RID body, int mask )
void body_set_enable_continuous_collision_detection ( RID body, bool enable )
void body_set_force_integration_callback ( RID body, Object receiver, String method, Variant userdata=null )
void body_set_max_contacts_reported ( RID body, int amount )
void body_set_mode ( RID body, int mode )
void body_set_omit_force_integration ( RID body, bool enable )
void body_set_param ( RID body, int param, float value )
void body_set_ray_pickable ( RID body, bool enable )
void body_set_shape ( RID body, int shape_idx, RID shape )
void body_set_shape_transform ( RID body, int shape_idx, Transform transform )
void body_set_space ( RID body, RID space )
void body_set_state ( RID body, int state, Variant value )
float cone_twist_joint_get_param ( RID joint, int param ) const
void cone_twist_joint_set_param ( RID joint, int param, float value )
void free_rid ( RID rid )
bool generic_6dof_joint_get_flag ( RID joint, int axis, int flag )
float generic_6dof_joint_get_param ( RID joint, int axis, int param )
void generic_6dof_joint_set_flag ( RID joint, int axis, int flag, bool enable )
void generic_6dof_joint_set_param ( RID joint, int axis, int param, float value )
int get_process_info ( int process_info )
bool hinge_joint_get_flag ( RID joint, int flag ) const
float hinge_joint_get_param ( RID joint, int param ) const
void hinge_joint_set_flag ( RID joint, int flag, bool enabled )
void hinge_joint_set_param ( RID joint, int param, float value )
RID joint_create_cone_twist ( RID body_A, Transform local_ref_A, RID body_B, Transform local_ref_B )
RID joint_create_generic_6dof ( RID body_A, Transform local_ref_A, RID body_B, Transform local_ref_B )
RID joint_create_hinge ( RID body_A, Transform hinge_A, RID body_B, Transform hinge_B )
RID joint_create_pin ( RID body_A, Vector3 local_A, RID body_B, Vector3 local_B )
RID joint_create_slider ( RID body_A, Transform local_ref_A, RID body_B, Transform local_ref_B )
int joint_get_solver_priority ( RID joint ) const
int joint_get_type ( RID joint ) const
void joint_set_solver_priority ( RID joint, int priority )
Vector3 pin_joint_get_local_a ( RID joint ) const
Vector3 pin_joint_get_local_b ( RID joint ) const
float pin_joint_get_param ( RID joint, int param ) const
void pin_joint_set_local_a ( RID joint, Vector3 local_A )
void pin_joint_set_local_b ( RID joint, Vector3 local_B )
void pin_joint_set_param ( RID joint, int param, float value )
void set_active ( bool active )
RID shape_create ( int type )
Variant shape_get_data ( RID shape ) const
int shape_get_type ( RID shape ) const
void shape_set_data ( RID shape, Variant data )
float slider_joint_get_param ( RID joint, int param ) const
void slider_joint_set_param ( RID joint, int param, float value )
RID space_create ( )
PhysicsDirectSpaceState space_get_direct_state ( RID space )
float space_get_param ( RID space, int param ) const
bool space_is_active ( RID space ) const
void space_set_active ( RID space, bool active )
void space_set_param ( RID space, int param, float value )

Numeric Constants

  • JOINT_PIN = 0
  • JOINT_HINGE = 1
  • JOINT_SLIDER = 2
  • JOINT_CONE_TWIST = 3
  • JOINT_6DOF = 4
  • PIN_JOINT_BIAS = 0
  • PIN_JOINT_DAMPING = 1
  • PIN_JOINT_IMPULSE_CLAMP = 2
  • HINGE_JOINT_BIAS = 0
  • HINGE_JOINT_LIMIT_UPPER = 1
  • HINGE_JOINT_LIMIT_LOWER = 2
  • HINGE_JOINT_LIMIT_BIAS = 3
  • HINGE_JOINT_LIMIT_SOFTNESS = 4
  • HINGE_JOINT_LIMIT_RELAXATION = 5
  • HINGE_JOINT_MOTOR_TARGET_VELOCITY = 6
  • HINGE_JOINT_MOTOR_MAX_IMPULSE = 7
  • HINGE_JOINT_FLAG_USE_LIMIT = 0
  • HINGE_JOINT_FLAG_ENABLE_MOTOR = 1
  • SLIDER_JOINT_LINEAR_LIMIT_UPPER = 0
  • SLIDER_JOINT_LINEAR_LIMIT_LOWER = 1
  • SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS = 2
  • SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION = 3
  • SLIDER_JOINT_LINEAR_LIMIT_DAMPING = 4
  • SLIDER_JOINT_LINEAR_MOTION_SOFTNESS = 5
  • SLIDER_JOINT_LINEAR_MOTION_RESTITUTION = 6
  • SLIDER_JOINT_LINEAR_MOTION_DAMPING = 7
  • SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS = 8
  • SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION = 9
  • SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING = 10
  • SLIDER_JOINT_ANGULAR_LIMIT_UPPER = 11
  • SLIDER_JOINT_ANGULAR_LIMIT_LOWER = 12
  • SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS = 13
  • SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION = 14
  • SLIDER_JOINT_ANGULAR_LIMIT_DAMPING = 15
  • SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS = 16
  • SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION = 17
  • SLIDER_JOINT_ANGULAR_MOTION_DAMPING = 18
  • SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS = 19
  • SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION = 20
  • SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING = 21
  • SLIDER_JOINT_MAX = 22
  • CONE_TWIST_JOINT_SWING_SPAN = 0
  • CONE_TWIST_JOINT_TWIST_SPAN = 1
  • CONE_TWIST_JOINT_BIAS = 2
  • CONE_TWIST_JOINT_SOFTNESS = 3
  • CONE_TWIST_JOINT_RELAXATION = 4
  • G6DOF_JOINT_LINEAR_LOWER_LIMIT = 0
  • G6DOF_JOINT_LINEAR_UPPER_LIMIT = 1
  • G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS = 2
  • G6DOF_JOINT_LINEAR_RESTITUTION = 3
  • G6DOF_JOINT_LINEAR_DAMPING = 4
  • G6DOF_JOINT_ANGULAR_LOWER_LIMIT = 5
  • G6DOF_JOINT_ANGULAR_UPPER_LIMIT = 6
  • G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS = 7
  • G6DOF_JOINT_ANGULAR_DAMPING = 8
  • G6DOF_JOINT_ANGULAR_RESTITUTION = 9
  • G6DOF_JOINT_ANGULAR_FORCE_LIMIT = 10
  • G6DOF_JOINT_ANGULAR_ERP = 11
  • G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY = 12
  • G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT = 13
  • G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT = 0
  • G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT = 1
  • G6DOF_JOINT_FLAG_ENABLE_MOTOR = 2
  • SHAPE_PLANE = 0
  • SHAPE_RAY = 1
  • SHAPE_SPHERE = 2
  • SHAPE_BOX = 3
  • SHAPE_CAPSULE = 4
  • SHAPE_CONVEX_POLYGON = 5
  • SHAPE_CONCAVE_POLYGON = 6
  • SHAPE_HEIGHTMAP = 7
  • SHAPE_CUSTOM = 8
  • AREA_PARAM_GRAVITY = 0
  • AREA_PARAM_GRAVITY_VECTOR = 1
  • AREA_PARAM_GRAVITY_IS_POINT = 2
  • AREA_PARAM_GRAVITY_DISTANCE_SCALE = 3
  • AREA_PARAM_GRAVITY_POINT_ATTENUATION = 4
  • AREA_PARAM_LINEAR_DAMP = 5
  • AREA_PARAM_ANGULAR_DAMP = 6
  • AREA_PARAM_PRIORITY = 7
  • AREA_SPACE_OVERRIDE_DISABLED = 0 — This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
  • AREA_SPACE_OVERRIDE_COMBINE = 1 — This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
  • AREA_SPACE_OVERRIDE_COMBINE_REPLACE = 2 — This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
  • AREA_SPACE_OVERRIDE_REPLACE = 3 — This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
  • AREA_SPACE_OVERRIDE_REPLACE_COMBINE = 4 — This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
  • BODY_MODE_STATIC = 0
  • BODY_MODE_KINEMATIC = 1
  • BODY_MODE_RIGID = 2
  • BODY_MODE_CHARACTER = 3
  • BODY_PARAM_BOUNCE = 0
  • BODY_PARAM_FRICTION = 1
  • BODY_PARAM_MASS = 2
  • BODY_PARAM_GRAVITY_SCALE = 3
  • BODY_PARAM_ANGULAR_DAMP = 5
  • BODY_PARAM_LINEAR_DAMP = 4
  • BODY_PARAM_MAX = 6
  • BODY_STATE_TRANSFORM = 0
  • BODY_STATE_LINEAR_VELOCITY = 1
  • BODY_STATE_ANGULAR_VELOCITY = 2
  • BODY_STATE_SLEEPING = 3
  • BODY_STATE_CAN_SLEEP = 4
  • AREA_BODY_ADDED = 0
  • AREA_BODY_REMOVED = 1
  • INFO_ACTIVE_OBJECTS = 0
  • INFO_COLLISION_PAIRS = 1
  • INFO_ISLAND_COUNT = 2

Member Function Description

  • void area_attach_object_instance_id ( RID area, int id )
  • void area_clear_shapes ( RID area )
  • RID area_create ( )
  • int area_get_object_instance_id ( RID area ) const
  • RID area_get_shape ( RID area, int shape_idx ) const
  • int area_get_shape_count ( RID area ) const
  • RID area_get_space ( RID area ) const
  • int area_get_space_override_mode ( RID area ) const
  • bool area_is_ray_pickable ( RID area ) const
  • void area_remove_shape ( RID area, int shape_idx )
  • void area_set_collision_layer ( RID area, int layer )
  • void area_set_collision_mask ( RID area, int mask )
  • void area_set_monitor_callback ( RID area, Object receiver, String method )
  • void area_set_ray_pickable ( RID area, bool enable )
  • void area_set_shape ( RID area, int shape_idx, RID shape )
  • void area_set_shape_transform ( RID area, int shape_idx, Transform transform )
  • void area_set_space ( RID area, RID space )
  • void area_set_space_override_mode ( RID area, int mode )
  • void body_add_collision_exception ( RID body, RID excepted_body )
  • void body_apply_torque_impulse ( RID body, Vector3 impulse )
  • void body_attach_object_instance_id ( RID body, int id )
  • void body_clear_shapes ( RID body )
  • RID body_create ( int mode=false, bool init_sleeping=2 )
  • int body_get_axis_lock ( RID body ) const
  • int body_get_collision_layer ( RID body ) const
  • int body_get_collision_mask ( RID body ) const
  • int body_get_max_contacts_reported ( RID body ) const
  • int body_get_mode ( RID body ) const
  • int body_get_object_instance_id ( RID body ) const
  • RID body_get_shape ( RID body, int shape_idx ) const
  • int body_get_shape_count ( RID body ) const
  • RID body_get_space ( RID body ) const
  • bool body_is_continuous_collision_detection_enabled ( RID body ) const
  • bool body_is_omitting_force_integration ( RID body ) const
  • bool body_is_ray_pickable ( RID body ) const
  • void body_remove_collision_exception ( RID body, RID excepted_body )
  • void body_remove_shape ( RID body, int shape_idx )
  • void body_set_axis_lock ( RID body, int axis )
  • void body_set_axis_velocity ( RID body, Vector3 axis_velocity )
  • void body_set_collision_layer ( RID body, int layer )
  • void body_set_collision_mask ( RID body, int mask )
  • void body_set_enable_continuous_collision_detection ( RID body, bool enable )
  • void body_set_force_integration_callback ( RID body, Object receiver, String method, Variant userdata=null )
  • void body_set_max_contacts_reported ( RID body, int amount )
  • void body_set_mode ( RID body, int mode )
  • void body_set_omit_force_integration ( RID body, bool enable )
  • void body_set_param ( RID body, int param, float value )
  • void body_set_ray_pickable ( RID body, bool enable )
  • void body_set_shape ( RID body, int shape_idx, RID shape )
  • void body_set_shape_transform ( RID body, int shape_idx, Transform transform )
  • void body_set_space ( RID body, RID space )
  • float cone_twist_joint_get_param ( RID joint, int param ) const
  • void cone_twist_joint_set_param ( RID joint, int param, float value )
  • void free_rid ( RID rid )
  • bool generic_6dof_joint_get_flag ( RID joint, int axis, int flag )
  • float generic_6dof_joint_get_param ( RID joint, int axis, int param )
  • void generic_6dof_joint_set_flag ( RID joint, int axis, int flag, bool enable )
  • void generic_6dof_joint_set_param ( RID joint, int axis, int param, float value )
  • int get_process_info ( int process_info )
  • bool hinge_joint_get_flag ( RID joint, int flag ) const
  • float hinge_joint_get_param ( RID joint, int param ) const
  • void hinge_joint_set_flag ( RID joint, int flag, bool enabled )
  • void hinge_joint_set_param ( RID joint, int param, float value )
  • int joint_get_solver_priority ( RID joint ) const
  • int joint_get_type ( RID joint ) const
  • void joint_set_solver_priority ( RID joint, int priority )
  • Vector3 pin_joint_get_local_a ( RID joint ) const
  • Vector3 pin_joint_get_local_b ( RID joint ) const
  • float pin_joint_get_param ( RID joint, int param ) const
  • void pin_joint_set_local_a ( RID joint, Vector3 local_A )
  • void pin_joint_set_local_b ( RID joint, Vector3 local_B )
  • void pin_joint_set_param ( RID joint, int param, float value )
  • void set_active ( bool active )
  • RID shape_create ( int type )
  • int shape_get_type ( RID shape ) const
  • float slider_joint_get_param ( RID joint, int param ) const
  • void slider_joint_set_param ( RID joint, int param, float value )
  • RID space_create ( )
  • bool space_is_active ( RID space ) const
  • void space_set_active ( RID space, bool active )
  • void space_set_param ( RID space, int param, float value )