|
TorqueScript Reference
|
Inherits BehaviorComponent.
Public Member Functions | |
| void | add (sceneObject) |
| void | addAssetPreload (assetId) |
| void | clear ([deleteObjects]) |
| void | clearAssetPreloads () |
| String | create (type) |
| Integer | createDistanceJoint (sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [distance], [frequency], [dampingRatio], [collideConnected]) |
| Integer | createFrictionJoint (sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [maxForce], [maxTorque], [collideConnected]) |
| Integer | createMotorJoint (sceneObjectA, sceneObjectB, [linearOffset X/Y], [angularOffset], [maxForce], [maxTorque], [correctionFactor], [collideConnected]) |
| Integer | createPrismaticJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y, [collideConnected]) |
| Integer | createPulleyJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldGroundAnchorA X/Y, worldGroundAnchorB X/Y, ratio, [lengthA], [lengthB], [collideConnected]) |
| Integer | createRevoluteJoint (sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [collideConnected]) |
| Integer | createRopeJoint (sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [maxLength], [collideConnected]) |
| Integer | createTargetJoint (sceneObject, worldTarget X/Y, maxForce, [useCenterOfMass?], [frequency], [dampingRatio], [collideConnected]) |
| Integer | createWeldJoint (sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [frequency], [dampingRatio], [collideConnected]) |
| Integer | createWheelJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y, [collideConnected]) |
| Boolean | deleteJoint (int jointId) |
| String | getAssetPreload (index) |
| Integer | getAssetPreloadCount () |
| Boolean | getBatchingEnabled () |
| String | getControllers () |
| Integer | getCount () |
| String | getDebugOn () |
| Integer | getDebugSceneObject () |
| Float | getDistanceJointDampingRatio (jointId) |
| Float | getDistanceJointFrequency (jointId) |
| Float | getDistanceJointLength (jointId) |
| Float | getFPS () |
| Integer | getFrameCount () |
| Float | getFrictionJointMaxForce (jointId) |
| Float | getFrictionJointMaxTorque (jointId) |
| Integer | getGlobalSceneCount () |
| String | getGravity () |
| Integer | getJointCount () |
| String | getJointType (int jointId) |
| String | getLayerSortMode (layer) |
| Float | getMaxFPS () |
| Float | getMinFPS () |
| Float | getMotorJointAngularOffset (jointId) |
| String | getMotorJointLinearOffset (jointId) |
| Float | getMotorJointMaxForce (jointId) |
| Float | getMotorJointMaxTorque (jointId) |
| Integer | getObject (sceneObjectIndex) |
| Integer | getPositionIterations () |
| String | getPrismaticJointLimit (jointId) |
| String | getPrismaticJointMotor (jointId) |
| Float | getRevoluteJointAngle (jointId) |
| String | getRevoluteJointLimit (jointId) |
| String | getRevoluteJointMotor (jointId) |
| Float | getRevoluteJointSpeed (jointId) |
| Float | getRopeJointMaxLength (jointId) |
| String | getSceneObjectList () |
| Boolean | getScenePause () |
| Float | getSceneTime () |
| Float | getTargetJointDampingRatio (jointId) |
| Float | getTargetJointFrequency (jointId) |
| String | getTargetJointTarget (jointId) |
| Integer | getVelocityIterations () |
| Float | getWeldJointDampingRatio (jointId) |
| Float | getWeldJointFrequency (jointId) |
| Float | getWheelJointDampingRatio (jointId) |
| Float | getWheelJointFrequency (jointId) |
| String | getWheelJointMotor (jointId) |
| Boolean | isJoint (int jointId) |
| void | mergeScene (scene) |
| String | pickArea (startx/y, endx/y, [sceneGroupMask], [sceneLayerMask], [pickMode]) |
| String | pickCircle (x/y, radius, [sceneGroupMask], [sceneLayerMask], [pickMode]) |
| String | pickPoint (x/y, [sceneGroupMask], [sceneLayerMask], [pickMode]) |
| String | pickRay (startx/y, endx/y, [sceneGroupMask], [sceneLayerMask], [pickMode]) |
| String | pickRayCollision (startx/y, endx/y, [sceneGroupMask], [sceneLayerMask]) |
| void | remove (sceneObject) |
| void | removeAssetPreload (assetId) |
| void | resetDebugStats () |
| void | setBatchingEnabled (bool enabled) |
| void | setDebugOff (debugOptions) |
| void | setDebugOn (debugOptions) |
| void | setDebugSceneObject (sceneObject) |
| void | setDistanceJointDampingRatio (jointId, dampingRatio) |
| void | setDistanceJointFrequency (jointId, frequency) |
| void | setDistanceJointLength (jointId, length) |
| void | setFrictionJointMaxForce (jointId, maxForce) |
| void | setFrictionJointMaxTorque (jointId, maxTorque) |
| void | setGravity (forceX/forceY) |
| void | setIsEditorScene () |
| void | setLayerSortMode (layer, sortMode) |
| void | setMotorJointAngularOffset (jointId, angularOffset) |
| void | setMotorJointLinearOffset (jointId, linearOffset X/Y) |
| void | setMotorJointMaxForce (jointId, maxForce) |
| void | setMotorJointMaxTorque (jointId, maxTorque) |
| void | setPositionIterations (int iterations) |
| void | setPrismaticJointLimit (jointId, enableLimit, [lowerTranslation], [upperTranslation]) |
| void | setPrismaticJointMotor (jointId, enableMotor, [motorSpeed], [maxMotorForce]) |
| void | setRevoluteJointLimit (jointId, enableLimit, [lowerAngle], [upperAngle]) |
| void | setRevoluteJointMotor (jointId, enableMotor, [motorSpeed], [maxMotorTorque]) |
| void | setRopeJointMaxLength (jointId, maxLength) |
| void | setScenePause (status) |
| void | setTargetJointDampingRatio (jointId, dampingRatio) |
| void | setTargetJointFrequency (jointId, frequency) |
| void | setTargetJointTarget (jointId, worldTarget X/Y) |
| void | setVelocityIterations (int iterations) |
| void | setWeldJointDampingRatio (jointId, dampingRatio) |
| void | setWeldJointFrequency (jointId, frequency) |
| void | setWheelJointDampingRatio (jointId, dampingRatio) |
| void | setWheelJointFrequency (jointId, frequency) |
| void | setWheelJointMotor (jointId, enableMotor, [motorSpeed], [maxMotorTorque]) |
Public Member Functions inherited from BehaviorComponent | |
| Boolean | addBehavior (BehaviorInstance bi) |
| void | clearBehaviors () |
| Boolean | connect (outputBehavior, inputBehavior, outputName, inputName) |
| Boolean | disconnect (outputBehavior, inputBehavior, outputName, inputName) |
| Integer | getBehavior (string BehaviorTemplateName) |
| Integer | getBehaviorByIndex (int index) |
| String | getBehaviorConnection (outputBehavior, outputName, connectionIndex) |
| Integer | getBehaviorConnectionCount (outputBehavior, outputName) |
| Integer | getBehaviorCount () |
| Boolean | raise (outputBehavior, outputName, [deltaTime]) |
| Boolean | removeBehavior (BehaviorInstance bi, [bool deleteBehavior=true]) |
| Boolean | reOrder (BehaviorInstance inst, [int desiredIndex=0]) |
Public Member Functions inherited from DynamicConsoleMethodComponent | |
| String | callOnBehaviors (methodName, argi) |
Public Member Functions inherited from SimComponent | |
| Boolean | addComponents (compObjName, compObjName2,...) |
| Integer | getComponent (idx) |
| Integer | getComponentCount () |
| Boolean | isEnabled () |
| Boolean | removeComponents (compObjName, compObjName2,...) |
| void | setEnabled (enabled) |
Public Member Functions inherited from SimObject | |
| Integer | clone ([copyDynamicFields=false]?) |
| void | delete () |
| Integer | getId () |
| void | setName (newName) |
| String | getName () |
| String | getClassNamespace () |
| String | getSuperClassNamespace () |
| void | setClassNamespace (nameSpace) |
| void | setSuperClassNamespace () |
| Boolean | isMethod (string methodName) |
| String | call (methodName, [args]*) |
| void | dumpClassHierarchy () |
| void | dump () |
| Boolean | isMemberOfClass (string classname) |
| String | getClassName () |
| String | getFieldValue (fieldName) |
| Boolean | setFieldValue (fieldName, value) |
| Integer | getDynamicFieldCount () |
| String | getDynamicField (index) |
| Integer | getFieldCount () |
| String | getField (int index) |
| void | setProgenitorFile (file) |
| String | getProgenitorFile () |
| Integer | getType () |
| String | getFieldType (fieldName) |
| void | setInternalName (string InternalName) |
| String | getInternalName () |
| Boolean | isChildOfGroup (groupID) |
| Integer | getGroup () |
| Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?) |
| void | stopTimer () |
| Boolean | isTimerActive () |
| Integer | schedule (time, command, [arg]*) |
| Boolean | save (fileName, [selectedOnly]?) |
| void | addFieldFilter (fieldName) |
| void | removeFieldFilter (fieldName) |
| void add | ( | sceneObject | ) |
Add the SceneObject to the scene.
| sceneObject | The SceneObject to add to the scene. |
| void addAssetPreload | ( | assetId | ) |
Adds the asset Id so that it is preloaded when the scene is loaded. The asset loaded immediately by this operation. Duplicate assets are ignored.
| assetId | The asset Id to be added. |
| void clear | ( | ) |
Clear the scene of all scene objects.
| deleteObjects | A boolean flag that sets whether to delete the objects as well as remove them from the scene (default is true). |
| void clearAssetPreloads | ( | ) |
Clears all assets added as a preload.
| String create | ( | type | ) |
Creates the specified scene-object derived type and adds it to the scene.
| Integer createDistanceJoint | ( | sceneObjectA | , |
| sceneObjectB | |||
| ) |
Creates a distance joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| distance | The distance the joint should maintain between scene objects. The default is the distance currently between the scene objects. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness (default). |
| dampingRatio | The damping ratio. 0 = no damping (default), 1 = critical damping. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createFrictionJoint | ( | sceneObjectA | , |
| sceneObjectB | |||
| ) |
Creates a friction joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| maxForce | The maximum friction force (N). |
| maxTorque | The maximum torque force (N-m). |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createMotorJoint | ( | sceneObjectA | , |
| sceneObjectB | |||
| ) |
Creates a motor joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| linearOffsetX/Y | The linear offset in sceneObjectA space. |
| angularOffset | The angularOffset between the bodies. |
| maxForce | The maximum friction force (N). |
| maxTorque | The maximum torque force (N-m). |
| correctionFactor | The correction factor (tolerance). |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createPrismaticJoint | ( | sceneObjectA | , |
| sceneObjectB | , | ||
| localAnchorA X/ | Y, | ||
| localAnchorB X/ | Y, | ||
| worldAxis X/ | Y | ||
| ) |
Creates a prismatic joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| worldAxis | The world axis defining the translational degree of freedom. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createPulleyJoint | ( | sceneObjectA | , |
| sceneObjectB | , | ||
| localAnchorA X/ | Y, | ||
| localAnchorB X/ | Y, | ||
| worldGroundAnchorA X/ | Y, | ||
| worldGroundAnchorB X/ | Y, | ||
| ratio | |||
| ) |
Creates a pulley joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| worldGroundAnchorA | The world point of the first ground anchor. This point never moves. |
| worldGroundAnchorB | The world point of the second ground anchor. This point never moves. |
| ratio | The pulley ratio used to simulate a block-and-tackle pulley. |
| lengthA | The reference pulley length for the segment attached to scene object A. Defaults to the distance between the first scene object and the first ground anchor. |
| lengthB | The reference pulley length for the segment attached to scene object B. Defaults to the distance between the second scene object and the second ground anchor. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createRevoluteJoint | ( | sceneObjectA | , |
| sceneObjectB | |||
| ) |
Creates a revolute joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createRopeJoint | ( | sceneObjectA | , |
| sceneObjectB | |||
| ) |
Creates a rope joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| maxLength | The maximum rigid length of the rope. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createTargetJoint | ( | sceneObject | , |
| worldTarget X/ | Y, | ||
| maxForce | |||
| ) |
Creates a target joint.
| sceneObject | The scene object to connect to the joint. |
| worldTarget | The world point target to move the scene object to. |
| maxForce | The maximum force the joint should use to position the scene object at the target. |
| useCenterOfMass | Whether to use the center of mass as the point which the joint is attached or not. Defaults to false. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness (default=0.7). |
| dampingRatio | The damping ratio. 0 = no damping (default), 1 = critical damping. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createWeldJoint | ( | sceneObjectA | , |
| sceneObjectB | |||
| ) |
Creates a weld joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness (default). |
| dampingRatio | The damping ratio. 0 = no damping (default), 1 = critical damping. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Integer createWheelJoint | ( | sceneObjectA | , |
| sceneObjectB | , | ||
| localAnchorA X/ | Y, | ||
| localAnchorB X/ | Y, | ||
| worldAxis X/ | Y | ||
| ) |
Creates a wheel joint.
| sceneObjectA | The first scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| sceneObjectB | The second scene object to connect to the joint. Use an empty string to indicate the Scene ground body. |
| localAnchorA | The local point of the first scene object where the joint connects. |
| localAnchorB | The local point of the second scene object where the joint connects. |
| worldAxis | The world axis of the wheel suspension spring. |
| collideConnected | Whether the scene objects can collide with each other while connected with this joint. |
| Boolean deleteJoint | ( | int | jointId | ) |
Deletes the specified joint Id.
| jointId | The Id of the joint. |
| String getAssetPreload | ( | index | ) |
Gets the asset to be preloaded at the specified index.
| index | The index of the preloaded asset. |
| Integer getAssetPreloadCount | ( | ) |
Gets the number of assets set to preload for this scene.
| Boolean getBatchingEnabled | ( | ) |
Gets whether render batching is enabled or not. return Whether render batching is enabled or not.
| Integer getCount | ( | ) |
Gets the count of scene objects in the scnee.
| String getDebugOn | ( | ) |
Gets the state of the debug modes.
| Integer getDebugSceneObject | ( | ) |
( Gets the scene object being monitored in the debug metrics.
| Float getDistanceJointDampingRatio | ( | jointId | ) |
Gets the damping ratio.
| jointId | The Id of the joint to use. |
| Float getDistanceJointFrequency | ( | jointId | ) |
Gets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| Float getDistanceJointLength | ( | jointId | ) |
Gets the distance the joint should maintain between scene objects.
| jointId | The Id of the joint to use. |
| Float getFPS | ( | ) |
Gets the current average frames-per-second.
| Integer getFrameCount | ( | ) |
Gets the current rendered frame count.
| Float getFrictionJointMaxForce | ( | jointId | ) |
Sets the maximum friction force.
| jointId | The Id of the joint to use. |
| Float getFrictionJointMaxTorque | ( | jointId | ) |
Gets the maximum torque force.
| jointId | The Id of the joint to use. |
| Integer getGlobalSceneCount | ( | ) |
Gets the system-wide scene count.
| String getGravity | ( | ) |
Gets the gravity force applied to all objects in the scene.
| Integer getJointCount | ( | ) |
Gets the joint count.
| String getJointType | ( | int | jointId | ) |
Gets the joint type of the specified joint Id.
| jointId | The Id of the joint. |
| String getLayerSortMode | ( | layer | ) |
Gets the render sort mode for the specified layer.
| layer | The layer to retrieve. |
| Float getMaxFPS | ( | ) |
Gets the maximum average frames-per-second.
| Float getMinFPS | ( | ) |
Gets the minimum average frames-per-second.
| Float getMotorJointAngularOffset | ( | jointId | ) |
Gets angularOffset between the bodies.
| jointId | The Id of the joint to use. |
| String getMotorJointLinearOffset | ( | jointId | ) |
Gets the linear offset in sceneObjectA space.
| jointId | The Id of the joint to use. |
| Float getMotorJointMaxForce | ( | jointId | ) |
Sets the maximum motor force.
| jointId | The Id of the joint to use. |
| Float getMotorJointMaxTorque | ( | jointId | ) |
Gets the maximum motor torque force.
| jointId | The Id of the joint to use. |
| Integer getObject | ( | sceneObjectIndex | ) |
Gets the scene object at the selected index.
| sceneObjectIndex | The index of the desired object |
| Integer getPositionIterations | ( | ) |
Gets the number of position iterations the physics solver uses. (
| String getPrismaticJointLimit | ( | jointId | ) |
Gets whether the joint has translational limits or not and the limits themselves.
| String getPrismaticJointMotor | ( | jointId | ) |
Gets whether the joint has a motor or not and the motor settings.
| Float getRevoluteJointAngle | ( | jointId | ) |
Gets the current angle of a revolute joint.
| jointId | The Id of the joint to use. |
| String getRevoluteJointLimit | ( | jointId | ) |
Gets whether the joint has angular limits or not and the limits themselves.
| jointId | The Id of the joint to use. |
| String getRevoluteJointMotor | ( | jointId | ) |
Gets whether the joint has a motor or not and the motor settings.
| jointId | The Id of the joint to use. |
| Float getRevoluteJointSpeed | ( | jointId | ) |
Gets the current speed of a revolute joint.
| jointId | The Id of the joint to use. |
| Float getRopeJointMaxLength | ( | jointId | ) |
Gets the maximum rigid length of the rope.
| jointId | The Id of the joint to use. |
| String getSceneObjectList | ( | ) |
Gets the Scene Object-List.
| Boolean getScenePause | ( | ) |
Gets scene pause status.
| Float getTargetJointDampingRatio | ( | jointId | ) |
Sets the damping ratio.
| jointId | The Id of the joint to use. |
| Float getTargetJointFrequency | ( | jointId | ) |
Gets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| String getTargetJointTarget | ( | jointId | ) |
Gets the target world point for the scene object.
| jointId | The Id of the joint to use. |
| Integer getVelocityIterations | ( | ) |
Gets the number of velocity iterations the physics solver uses. (
| Float getWeldJointDampingRatio | ( | jointId | ) |
Gets the damping ratio.
| jointId | The Id of the joint to use. |
| Float getWeldJointFrequency | ( | jointId | ) |
Gets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| Float getWheelJointDampingRatio | ( | jointId | ) |
Gets the damping ratio.
| jointId | The Id of the joint to use. |
| Float getWheelJointFrequency | ( | jointId | ) |
Gets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| String getWheelJointMotor | ( | jointId | ) |
Gets whether the joint has a motor or not and the motor settings.
| jointId | The Id of the joint to use. |
| Boolean isJoint | ( | int | jointId | ) |
Gets whether the joint Id is valid or not.
| jointId | The Id of the joint. |
| void mergeScene | ( | scene | ) |
Merges the specified scene into this scene by cloning the scenes contents.
| String pickArea | ( | startx/ | y, |
| endx/ | y | ||
| ) |
Picks objects intersecting the specified area with optional group/layer masks.
| startx/y | The coordinates of the start point as either ( y\ or (x,y) |
| endx/y | The coordinates of the end point as either ( y\ or (x,y) |
| sceneGroupMask | Optional scene group mask. (-1) or empty string selects all groups. |
| sceneLayerMask | Optional scene layer mask. (-1) or empty string selects all layers. |
| pickMode | Optional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'oobb'). |
| String pickCircle | ( | x/ | y, |
| radius | |||
| ) |
Picks objects intersecting the specified circle with optional group/layer masks.
| x/y | The coordinate of the point as either ( y\ or (x,y) |
| radius | The radius of the circle. |
| sceneGroupMask | Optional scene group mask. (-1) or empty string selects all groups. |
| sceneLayerMask | Optional scene layer mask. (-1) or empty string selects all layers. |
| pickMode | Optional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'ooabb'). |
| String pickPoint | ( | x/ | y | ) |
Picks objects intersecting the specified point with optional group/layer masks.
| x/y | The coordinate of the point as either ( y\ or (x,y) |
| sceneGroupMask | Optional scene group mask. (-1) or empty string selects all groups. |
| sceneLayerMask | Optional scene layer mask. (-1) or empty string selects all layers. |
| pickMode | Optional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'ooabb'). |
| String pickRay | ( | startx/ | y, |
| endx/ | y | ||
| ) |
Picks objects intersecting the specified ray with optional group/layer masks.
| startx/y | The coordinates of the start point as either ( y\ or (x,y) |
| endx/y | The coordinates of the end point as either ( y\ or (x,y) |
| sceneGroupMask | Optional scene group mask. (-1) or empty string selects all groups. |
| sceneLayerMask | Optional scene layer mask. (-1) or empty string selects all layers. |
| pickMode | Optional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'oobb'). |
| String pickRayCollision | ( | startx/ | y, |
| endx/ | y | ||
| ) |
Picks objects with collision shapes intersecting the specified ray with optional group/layer masks. Unlike other pick methods, this returns the complete detail for each object encountered, returning the collision point, normal and fraction of the ray intersection.
| startx/y | The coordinates of the start point as either ( y\ or (x,y) |
| endx/y | The coordinates of the end point as either ( y\ or (x,y) |
| sceneGroupMask | Optional scene group mask. (-1) or empty string selects all groups. |
| sceneLayerMask | Optional scene layer mask. (-1) or empty string selects all layers. |
| void remove | ( | sceneObject | ) |
Remove the SceneObject from the scene.
| sceneObject | The SceneObject to remove from the scene. |
| void removeAssetPreload | ( | assetId | ) |
Removes the asset Id from being preloaded when the scene is loaded. The asset may be unloaded immediately by this operation if it has no other references.
| assetId | The asset Id to be removed. |
| void resetDebugStats | ( | ) |
Resets the debug statistics.
| void setBatchingEnabled | ( | bool | enabled | ) |
Sets whether render batching is enabled or not.
| enabled | Whether render batching is enabled or not. return No return value. |
| void setDebugOff | ( | debugOptions | ) |
Sets Debug options(s) off.
| debugOptions | Either a list of debug modes to turn off (comma-separated) or a string (space-separated) |
| void setDebugOn | ( | debugOptions | ) |
Sets Debug option(s) on.
| debugOptions | Either a list of debug modes (comma-separated), or a string with the modes (space-separated) |
| void setDebugSceneObject | ( | sceneObject | ) |
Sets the scene object to monitor in the debug metrics.
| SceneObject | The scene object to monitor in the debug metrics. |
| void setDistanceJointDampingRatio | ( | jointId | , |
| dampingRatio | |||
| ) |
Sets the damping ratio.
| jointId | The Id of the joint to use. |
| dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping. |
| void setDistanceJointFrequency | ( | jointId | , |
| frequency | |||
| ) |
Sets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness. |
| void setDistanceJointLength | ( | jointId | , |
| length | |||
| ) |
Sets the distance the joint should maintain between scene objects.
| jointId | The Id of the joint to use. |
| length | The length the joint should maintain between scene objects. |
| void setFrictionJointMaxForce | ( | jointId | , |
| maxForce | |||
| ) |
Sets the maximum friction force.
| jointId | The Id of the joint to use. |
| maxForce | The maximum friction force (N). |
| void setFrictionJointMaxTorque | ( | jointId | , |
| maxTorque | |||
| ) |
Sets the maximum torque force.
| jointId | The Id of the joint to use. |
| maxTorque | The maximum torque force (N). |
| void setGravity | ( | forceX/ | forceY | ) |
The gravity force to apply to all objects in the scene.
| forceX/forceY | The direction and magnitude of the force in each direction. Formatted as either ( forceY\ or (forceX, forceY) |
| void setIsEditorScene | ( | ) |
Sets whether this is an editor scene.
| void setLayerSortMode | ( | layer | , |
| sortMode | |||
| ) |
Sets the layer to use the specified render sort mode.
| layer | The layer to modify. |
| sortMode | The sort mode to use on the specified layer. |
| void setMotorJointAngularOffset | ( | jointId | , |
| angularOffset | |||
| ) |
Sets the angularOffset between the bodies.
| jointId | The Id of the joint to use. |
| angularOffset | The angularOffset between the bodies. |
| void setMotorJointLinearOffset | ( | jointId | , |
| linearOffset X/ | Y | ||
| ) |
Sets the linear offset in sceneObjectA space.
| jointId | The Id of the joint to use. |
| linearOffsetX/Y | The linear offset in sceneObjectA space. |
| void setMotorJointMaxForce | ( | jointId | , |
| maxForce | |||
| ) |
Sets the maximum motor force.
| jointId | The Id of the joint to use. |
| maxForce | The maximum motor force (N). |
| void setMotorJointMaxTorque | ( | jointId | , |
| maxTorque | |||
| ) |
Sets the maximum motor torque force.
| jointId | The Id of the joint to use. |
| maxTorque | The maximum motor torque force (N). |
| void setPositionIterations | ( | int | iterations | ) |
Sets the number of position iterations the physics solver uses.
| void setPrismaticJointLimit | ( | jointId | , |
| enableLimit | |||
| ) |
Sets whether the joint has translational limits or not and the limits themselves.
| jointId | The Id of the joint to use. |
| enableLimit | Whether the joint has angular limits or not. |
| lowerTranslation | The lower translation limit. |
| upperTranslation | The upper translation limit. |
| void setPrismaticJointMotor | ( | jointId | , |
| enableMotor | |||
| ) |
Sets whether the joint has a motor or not and the motor settings.
| jointId | The Id of the joint to use. |
| enableMotor | Whether the joint has a motor or not. |
| motorSpeed | The motor speed (degrees per/sec). |
| maxMotorForce | The maximum motor force used to achieve the specified motor speed (N-m). |
| void setRevoluteJointLimit | ( | jointId | , |
| enableLimit | |||
| ) |
Sets whether the joint has angular limits or not and the limits themselves.
| jointId | The Id of the joint to use. |
| enableLimit | Whether the joint has angular limits or not. |
| lowerAngle | The lower angle of the angular limit. |
| upperAngle | The upper angle of the angular limit. |
| void setRevoluteJointMotor | ( | jointId | , |
| enableMotor | |||
| ) |
Sets whether the joint has a motor or not and the motor settings.
| jointId | The Id of the joint to use. |
| enableMotor | Whether the joint has a motor or not. |
| motorSpeed | The motor speed (degrees per/sec). |
| maxMotorTorque | The maximum motor torque used to achieve the specified motor speed (N-m). |
| void setRopeJointMaxLength | ( | jointId | , |
| maxLength | |||
| ) |
Sets the maximum rigid length of the rope.
| jointId | The Id of the joint to use. |
| maxLength | The maximum rigid length of the rope. |
| void setScenePause | ( | status | ) |
Sets scene pause status.
| void setTargetJointDampingRatio | ( | jointId | , |
| dampingRatio | |||
| ) |
Sets the damping ratio.
| jointId | The Id of the joint to use. |
| dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping. |
| void setTargetJointFrequency | ( | jointId | , |
| frequency | |||
| ) |
Sets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness. |
| void setTargetJointTarget | ( | jointId | , |
| worldTarget X/ | Y | ||
| ) |
Sets the target world point for the scene object.
| jointId | The Id of the joint to use. |
| worldTarget | The target world point to move the scene object to. |
| void setVelocityIterations | ( | int | iterations | ) |
Sets the number of velocity iterations the physics solver uses.
| void setWeldJointDampingRatio | ( | jointId | , |
| dampingRatio | |||
| ) |
Sets the damping ratio.
| jointId | The Id of the joint to use. |
| dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping. |
| void setWeldJointFrequency | ( | jointId | , |
| frequency | |||
| ) |
Sets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness. |
| void setWheelJointDampingRatio | ( | jointId | , |
| dampingRatio | |||
| ) |
Sets the damping ratio.
| jointId | The Id of the joint to use. |
| dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping. |
| void setWheelJointFrequency | ( | jointId | , |
| frequency | |||
| ) |
Sets the mass-spring-damper frequency in Hertz.
| jointId | The Id of the joint to use. |
| frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness. |
| void setWheelJointMotor | ( | jointId | , |
| enableMotor | |||
| ) |
Sets whether the joint has a motor or not and the motor settings.
| jointId | The Id of the joint to use. |
| enableMotor | Whether the joint has a motor or not. |
| motorSpeed | The motor speed (degrees per/sec). |
| maxMotorTorque | The maximum motor torque used to achieve the specified motor speed (N-m). |
1.8.10