physics module

This module provides access to the physics engine.

class physics.Physics

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

get_active_environment_by_index((Physics)arg1, (Channel)arg2) → PhysicsEnvironment
class physics.PhysicsEnvironment

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

get_active_object_by_index((PhysicsEnvironment)arg1, (Channel)arg2) → PhysicsObject
air_density
gravity
class physics.PhysicsObject

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

apply_force_center((PhysicsObject)arg1, (Vector)arg2) → None
is_attached_to_constraint((PhysicsObject)arg1, (bool)arg2) → bool
is_fluid((PhysicsObject)arg1) → bool :

Return True if the object is fluid.

is_hinged((PhysicsObject)arg1) → bool :

Return True if the object is hinged.

is_moveable((PhysicsObject)arg1) → bool
is_static((PhysicsObject)arg1) → bool :

Return True if the object is static.

is_trigger((PhysicsObject)arg1) → bool :

Return True if the object is a trigger.

output_debug_info((PhysicsObject)arg1) → None
recheck_collision_filter((PhysicsObject)arg1) → None
recheck_contact_points((PhysicsObject)arg1) → None
set_position((PhysicsObject)arg1, (Vector)arg2, (QAngle)arg3, (bool)arg4) → None
set_velocity((PhysicsObject)arg1, (Vector)arg2, (Vector)arg3) → None
set_velocity_instantaneous((PhysicsObject)arg1, (Vector)arg2, (Vector)arg3) → None
asleep

Return True if the object is asleep.

callback_flags
collision_enabled

Return True if collisions are enabled.

contents
drag_enabled

Return True if air fraction/drag is enabled.

energy
game_data
game_flags
game_index
gravity_enabled

Return True if gravity is enabled.

inertia
mass
mass_center_local_space
material_index
motion_enabled

Return True if motion is enabled.

name
position

Return a tuple that contains the position and the angle of the object.

sphere_radius

Return the radius if this is a sphere object (zero if this is a polygonal mesh).

velocity

Return a tuple that contains the velocity in worldspace and relative to the object.