PhysicsIsElement: Difference between revisions
Jump to navigation
Jump to search
CrosRoad95 (talk | contribs) (Created page with "__NOTOC__ {{Client function}} Returns whatever physics-element exists ==Syntax== <syntaxhighlight lang="lua"> bool physicsIsElement(physics-element thePhysicsElement)...") |
(No difference)
|
Latest revision as of 19:16, 19 February 2020
Returns whatever physics-element exists
Syntax
bool physicsIsElement(physics-element thePhysicsElement)
Required Arguments
- thePhysicsElement: physics element: shape, constraint, rigid body, static collision
Returns
True if physics element exists
Example
if shape got destroyed, static collisions, rigid body and its constraints will destroyed too, this example prove it.
local shape = physicsCreateShape(physics, "box", 1) local rb = physicsCreateRigidBody(shape) local col = physicsCreateStaticCollision(shape) local const = physicsCreateConstraint("pointtopoint", rb, 0,0,0) iprint("isElement before", physicsIsElement(shape), physicsIsElement(rb), physicsIsElement(col), physicsIsElement(const)) -- true, true, true, true physicsDestroy(shape) iprint("isElement after", physicsIsElement(shape), physicsIsElement(rb), physicsIsElement(col), physicsIsElement(const)) -- false, false, false ,false
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