Changeset View
Changeset View
Standalone View
Standalone View
doc/python_api/rst/bge.constraints.rst
| Physics Constraints (bge.constraints) | Physics Constraints (bge.constraints) | ||||
| ===================================== | ===================================== | ||||
| .. module:: bge.constraints | .. module:: bge.constraints | ||||
| .. literalinclude:: ../examples/bge.constraints.py | .. literalinclude:: ../examples/bge.constraints.py | ||||
| :language: rest | :language: rest | ||||
| :lines: 2-4 | :lines: 2-4 | ||||
| .. literalinclude:: ../examples/bge.constraints.py | .. literalinclude:: ../examples/bge.constraints.py | ||||
| :lines: 6- | :lines: 6- | ||||
| .. function:: createConstraint(physicsid, physicsid2, constrainttype, [pivotX, pivotY, pivotZ, [axisX, axisY, axisZ, [flag]]]]) | .. function:: createConstraint(physicsid_1, physicsid_2, constraint_type, pivot_X, pivot_y, pivot_z, axis_x, axis_y, axis_z, flag) | ||||
| Creates a constraint. | Creates a constraint. | ||||
| :arg physicsid: the physics id of the first object in constraint | :arg physicsid_1: the physics id of the first object in constraint | ||||
| :type physicsid: int | :type physicsid: int | ||||
| :arg physicsid2: the physics id of the second object in constraint | :arg physicsid_2: the physics id of the second object in constraint | ||||
| :type physicsid2: int | :type physicsid2: int | ||||
| :arg constrainttype: the type of the constraint. The constraint types are: | :arg constrainttype: the type of the constraint. The constraint types are: | ||||
| - :class:`POINTTOPOINT_CONSTRAINT` | - :class:`POINTTOPOINT_CONSTRAINT` | ||||
| - :class:`LINEHINGE_CONSTRAINT` | - :class:`LINEHINGE_CONSTRAINT` | ||||
| - :class:`ANGULAR_CONSTRAINT` | - :class:`ANGULAR_CONSTRAINT` | ||||
| - :class:`CONETWIST_CONSTRAINT` | - :class:`CONETWIST_CONSTRAINT` | ||||
| - :class:`VEHICLE_CONSTRAINT` | - :class:`VEHICLE_CONSTRAINT` | ||||
| - :class:`GENERIC_6DOF_CONSTRAINT` | - :class:`GENERIC_6DOF_CONSTRAINT` | ||||
| :type constrainttype: int | :type constrainttype: int | ||||
| :arg pivotX: pivot X position | :arg pivot_X: pivot X position | ||||
| :type pivotX: float | :type pivot_X: float (optional) | ||||
| :arg pivotY: pivot Y position | :arg pivot_Y: pivot Y position | ||||
| :type pivotY: float | :type pivot_Y: float (optional) | ||||
| :arg pivotZ: pivot Z position | :arg pivot_Z: pivot Z position | ||||
| :type pivotZ: float | :type pivot_Z: float (optional) | ||||
| :arg axisX: X axis | :arg axis_X: X axis angle in degrees | ||||
| :type axisX: float | :type axis_X: float (optional) | ||||
| :arg axisY: Y axis | :arg axis_Y: Y axis angle in degrees | ||||
| :type axisY: float | :type axis_Y: float (optional) | ||||
| :arg axisZ: Z axis | :arg axis_Z: Z axis angle in degrees | ||||
| :type axisZ: float | :type axis_Z: float (optional) | ||||
| :arg flag: 128 to disable collision between linked bodies | :arg flag: 128 to disable collision between linked bodies | ||||
| :type flag: int | :type flag: int (optional) | ||||
| .. attribute:: error | .. attribute:: error | ||||
| Simbolic constant string that indicates error. | Simbolic constant string that indicates error. | ||||
| .. function:: exportBulletFile(filename) | .. function:: exportBulletFile(filename) | ||||
| export a .bullet file | export a .bullet file | ||||
| ▲ Show 20 Lines • Show All 316 Lines • Show Last 20 Lines | |||||