physics module¶
This module provides access to the physics engine.
- class physics.Physics¶
Bases:
instance
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- get_active_environment_by_index((Physics)arg1, (_engines._sound.Channel)arg2) PhysicsEnvironment ¶
- class physics.PhysicsEnvironment¶
Bases:
instance
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- get_active_object_by_index((PhysicsEnvironment)arg1, (_engines._sound.Channel)arg2) PhysicsObject ¶
- property air_density¶
None( (_physics.PhysicsEnvironment)arg1) -> float
- property gravity¶
None( (_physics.PhysicsEnvironment)arg1) -> _mathlib.Vector
- class physics.PhysicsObject¶
Bases:
instance
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- 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_static((PhysicsObject)arg1) bool : ¶
Return True if the object is static.
- is_trigger((PhysicsObject)arg1) bool : ¶
Return True if the object is a trigger.
- set_velocity_instantaneous((PhysicsObject)arg1, (_mathlib.Vector)arg2, (_mathlib.Vector)arg3) None ¶
- property asleep¶
Return True if the object is asleep.
- property callback_flags¶
None( (_physics.PhysicsObject)arg1) -> int
- property collision_enabled¶
Return True if collisions are enabled.
- property contents¶
None( (_physics.PhysicsObject)arg1) -> int
- property drag_enabled¶
Return True if air fraction/drag is enabled.
- property energy¶
None( (_physics.PhysicsObject)arg1) -> float
- property game_data¶
None( (_physics.PhysicsObject)arg1) -> object
- property game_flags¶
None( (_physics.PhysicsObject)arg1) -> int
- property game_index¶
None( (_physics.PhysicsObject)arg1) -> int
- property gravity_enabled¶
Return True if gravity is enabled.
- property inertia¶
None( (_physics.PhysicsObject)arg1) -> _mathlib.Vector
- property mass¶
None( (_physics.PhysicsObject)arg1) -> float
- property mass_center_local_space¶
None( (_physics.PhysicsObject)arg1) -> _mathlib.Vector
- property material_index¶
None( (_physics.PhysicsObject)arg1) -> int
- property motion_enabled¶
Return True if motion is enabled.
- property name¶
None( (_physics.PhysicsObject)arg1) -> str
- property position¶
Return a tuple that contains the position and the angle of the object.
- property sphere_radius¶
Return the radius if this is a sphere object (zero if this is a polygonal mesh).
- property velocity¶
Return a tuple that contains the velocity in worldspace and relative to the object.