BGE: Some changes for the constraint document
* Change the constraint type alignment to vertical. * Changed PHY_CONE_TWIST_CONSTRAINT to the correct value. * Some minor changes.
This commit is contained in:
@@ -15,14 +15,7 @@ Physics Constraints (bge.constraints)
|
|||||||
|
|
||||||
Creates a constraint.
|
Creates a constraint.
|
||||||
|
|
||||||
:arg physicsid_1: the physics id of the first object in constraint
|
Constraints types:
|
||||||
:type physicsid: int
|
|
||||||
|
|
||||||
:arg physicsid_2: the physics id of the second object in constraint
|
|
||||||
:type physicsid2: int
|
|
||||||
|
|
||||||
:arg constrainttype: the type of the constraint. The constraint types are:
|
|
||||||
:type constrainttype: int
|
|
||||||
- :class:`POINTTOPOINT_CONSTRAINT`
|
- :class:`POINTTOPOINT_CONSTRAINT`
|
||||||
- :class:`LINEHINGE_CONSTRAINT`
|
- :class:`LINEHINGE_CONSTRAINT`
|
||||||
- :class:`ANGULAR_CONSTRAINT`
|
- :class:`ANGULAR_CONSTRAINT`
|
||||||
@@ -30,26 +23,35 @@ Physics Constraints (bge.constraints)
|
|||||||
- :class:`VEHICLE_CONSTRAINT`
|
- :class:`VEHICLE_CONSTRAINT`
|
||||||
- :class:`GENERIC_6DOF_CONSTRAINT`
|
- :class:`GENERIC_6DOF_CONSTRAINT`
|
||||||
|
|
||||||
:arg pivot_X: pivot X position
|
:arg physicsid_1: the physics id of the first object in constraint.
|
||||||
:type pivot_X: float (optional)
|
:type physicsid_1: int
|
||||||
|
|
||||||
:arg pivot_Y: pivot Y position
|
:arg physicsid_2: the physics id of the second object in constraint.
|
||||||
:type pivot_Y: float (optional)
|
:type physicsid_2: int
|
||||||
|
|
||||||
:arg pivot_Z: pivot Z position
|
:arg constrainttype: the type of the constraint.
|
||||||
:type pivot_Z: float (optional)
|
:type constrainttype: int
|
||||||
|
|
||||||
:arg axis_X: X axis angle in degrees
|
:arg pivot_X: pivot X position (optional).
|
||||||
:type axis_X: float (optional)
|
:type pivot_X: float
|
||||||
|
|
||||||
:arg axis_Y: Y axis angle in degrees
|
:arg pivot_Y: pivot Y position (optional).
|
||||||
:type axis_Y: float (optional)
|
:type pivot_Y: float
|
||||||
|
|
||||||
:arg axis_Z: Z axis angle in degrees
|
:arg pivot_Z: pivot Z position (optional).
|
||||||
:type axis_Z: float (optional)
|
:type pivot_Z: float
|
||||||
|
|
||||||
:arg flag: 128 to disable collision between linked bodies
|
:arg axis_X: X axis angle in degrees (optional).
|
||||||
:type flag: int (optional)
|
:type axis_X: float
|
||||||
|
|
||||||
|
:arg axis_Y: Y axis angle in degrees (optional).
|
||||||
|
:type axis_Y: float
|
||||||
|
|
||||||
|
:arg axis_Z: Z axis angle in degrees (optional).
|
||||||
|
:type axis_Z: float
|
||||||
|
|
||||||
|
:arg flag: 128 to disable collision between linked bodies (optional).
|
||||||
|
:type flag: int
|
||||||
|
|
||||||
:return: a constraint wrapper.
|
:return: a constraint wrapper.
|
||||||
:rtype: :class:`bge.types.KX_ConstraintWrapper`
|
:rtype: :class:`bge.types.KX_ConstraintWrapper`
|
||||||
|
@@ -28,7 +28,7 @@ base class --- :class:`PyObjectPlus`
|
|||||||
* Lowerlimit > Upperlimit -> axis is free
|
* Lowerlimit > Upperlimit -> axis is free
|
||||||
* Lowerlimit < Upperlimit -> axis it limited in that range
|
* Lowerlimit < Upperlimit -> axis it limited in that range
|
||||||
|
|
||||||
PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
|
For PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
|
||||||
|
|
||||||
axis = 3 is a constraint limit, with low/high limit value
|
axis = 3 is a constraint limit, with low/high limit value
|
||||||
* 3: X axis angle
|
* 3: X axis angle
|
||||||
@@ -38,7 +38,7 @@ base class --- :class:`PyObjectPlus`
|
|||||||
:arg value1 (max): Set the maximum limit of the axis
|
:arg value1 (max): Set the maximum limit of the axis
|
||||||
:type value1: float
|
:type value1: float
|
||||||
|
|
||||||
PHY_CONE_TWIST_CONSTRAINT = 3:
|
For PHY_CONE_TWIST_CONSTRAINT = 4:
|
||||||
|
|
||||||
axis = 3..5 are constraint limits, high limit values
|
axis = 3..5 are constraint limits, high limit values
|
||||||
* 3: X axis angle
|
* 3: X axis angle
|
||||||
@@ -50,7 +50,7 @@ base class --- :class:`PyObjectPlus`
|
|||||||
:arg value1 (max): Set the maximum limit of the axis
|
:arg value1 (max): Set the maximum limit of the axis
|
||||||
:type value1: float
|
:type value1: float
|
||||||
|
|
||||||
PHY_GENERIC_6DOF_CONSTRAINT = 12:
|
For PHY_GENERIC_6DOF_CONSTRAINT = 12:
|
||||||
|
|
||||||
axis = 0..2 are constraint limits, with low/high limit value
|
axis = 0..2 are constraint limits, with low/high limit value
|
||||||
* 0: X axis position
|
* 0: X axis position
|
||||||
@@ -133,10 +133,10 @@ base class --- :class:`PyObjectPlus`
|
|||||||
Returns the contraint type (read only)
|
Returns the contraint type (read only)
|
||||||
|
|
||||||
:type: integer
|
:type: integer
|
||||||
- 1 = :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
|
- 1 = :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
|
||||||
- 2 = :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
|
- 2 = :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
|
||||||
- 3 = :class:`~bge.constraints.ANGULAR_CONSTRAINT`
|
- 3 = :class:`~bge.constraints.ANGULAR_CONSTRAINT`
|
||||||
- 4 = :class:`~bge.constraints.CONETWIST_CONSTRAINT`
|
- 4 = :class:`~bge.constraints.CONETWIST_CONSTRAINT`
|
||||||
- 11 = :class:`~bge.constraints.VEHICLE_CONSTRAINT`
|
- 11 = :class:`~bge.constraints.VEHICLE_CONSTRAINT`
|
||||||
- 12 = :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
|
- 12 = :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user