PhysicsGetChildShapeOffsets
Jump to navigation
Jump to search
Returns offset position and rotation of child shape. Sometimes return number is slightly different than input!
Syntax
float float float float float float physicsGetChildShapeOffsets(physics-shape compoundShape, int index)
Required Arguments
- compoundShape: Must be compound shape
- index: Index of child. Starts from 1.
Returns
Returns offset position ( x,y,z ) and rotation (rx,ry,rz) of child shape. False otherwise
Example
local compound = physicsCreateShape(physics, "compound") local capsule = physicsCreateShape(physics, "capsule", 1, 1) physicsAddChildShape(compound, capsule,1,2,3,4,5,6) x,y,z,rx,ry,rz = physicsGetChildShapeOffsets(compound, 1) outputChatBox("Offset of first shape: ".. string.format("%.2f,%.2f,%.2f,%.2f,%.2f,%.2f", x,y,z,rx,ry,rz))
See Also
- physicsCreateWorld
- physicsDestroy
- physicsCreateShape
- physicsCreateShapeFromModel
- physicsCreateRigidBody
- physicsCreateStaticCollision
- physicsCreateConstraint
- physicsAddChildShape
- physicsRemoveChildShape
- physicsGetChildShapes
- physicsSetChildShapeOffsets
- physicsGetChildShapeOffsets
- physicsGetShapes
- physicsGetRigidBodies
- physicsGetStaticCollisions
- physicsGetConstraints
- physicsSetProperties
- physicsGetProperties
- physicsDrawDebug
- physicsSetDebugMode
- physicsBuildCollisionFromGTA
- physicsApplyVelocity
- physicsApplyVelocityForce
- physicsApplyAngularVelocity
- physicsApplyAngularVelocityForce
- physicsApplyDamping
- physicsRayCast
- physicsShapeCast
- physicsGetElementType
- physicsIsElement