TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Scene Class 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)

## Member Function Documentation

void add | ( | sceneObject |  | ) |

Add the SceneObject to the scene.

Parameters

  sceneObject | The SceneObject to add to the scene.

Returns
  No return value.

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.

Parameters

  assetId | The asset Id to be added.

Returns
  No return value.

void clear | ( |  | ) |

Clear the scene of all scene objects.

Parameters

  deleteObjects | A boolean flag that sets whether to delete the objects as well as remove them from the scene (default is true).

Returns
  No return value.

void clearAssetPreloads | ( |  | ) |

Clears all assets added as a preload.

Returns
  No return value.

String create | ( | type |  | ) |

Creates the specified scene-object derived type and adds it to the scene.

Returns
  The scene-object or NULL if not created.

Integer createDistanceJoint | ( | sceneObjectA | ,
|  | sceneObjectB |
| ) |  |

Creates a distance joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createFrictionJoint | ( | sceneObjectA | ,
|  | sceneObjectB |
| ) |  |

Creates a friction joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createMotorJoint | ( | sceneObjectA | ,
|  | sceneObjectB |
| ) |  |

Creates a motor joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createPrismaticJoint | ( | sceneObjectA | ,
|  | sceneObjectB | ,
|  | localAnchorA X/ | Y,
|  | localAnchorB X/ | Y,
|  | worldAxis X/ | Y
| ) |  |

Creates a prismatic joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createPulleyJoint | ( | sceneObjectA | ,
|  | sceneObjectB | ,
|  | localAnchorA X/ | Y,
|  | localAnchorB X/ | Y,
|  | worldGroundAnchorA X/ | Y,
|  | worldGroundAnchorB X/ | Y,
|  | ratio |
| ) |  |

Creates a pulley joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createRevoluteJoint | ( | sceneObjectA | ,
|  | sceneObjectB |
| ) |  |

Creates a revolute joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createRopeJoint | ( | sceneObjectA | ,
|  | sceneObjectB |
| ) |  |

Creates a rope joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createTargetJoint | ( | sceneObject | ,
|  | worldTarget X/ | Y,
|  | maxForce |
| ) |  |

Creates a target joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createWeldJoint | ( | sceneObjectA | ,
|  | sceneObjectB |
| ) |  |

Creates a weld joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Integer createWheelJoint | ( | sceneObjectA | ,
|  | sceneObjectB | ,
|  | localAnchorA X/ | Y,
|  | localAnchorB X/ | Y,
|  | worldAxis X/ | Y
| ) |  |

Creates a wheel joint.

Parameters

  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.

Returns
  The joint Id (-1 if error).

Boolean deleteJoint | ( | int | jointId | ) |

Deletes the specified joint Id.

Parameters

  jointId | The Id of the joint.

Returns
  Whether the joint was successfully deleted or not.

String getAssetPreload | ( | index |  | ) |

Gets the asset to be preloaded at the specified index.

Parameters

  index | The index of the preloaded asset.

Returns
  The asset to be preloaded at the specified index.

Integer getAssetPreloadCount | ( |  | ) |

Gets the number of assets set to preload for this scene.

Returns
  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.

String getControllers | ( |  | ) |

Gets the Scene Controllers.

Returns
  Gets the scene controllers.

Integer getCount | ( |  | ) |

Gets the count of scene objects in the scnee.

Returns
  Returns the number of scene objects in current scene as an integer.

String getDebugOn | ( |  | ) |

Gets the state of the debug modes.

Returns
  Returns a space separated list of debug modes that are active.

Integer getDebugSceneObject | ( |  | ) |

( Gets the scene object being monitored in the debug metrics.

Returns
  The scene object being monitored in the debug metrics (zero if none being monitored).

Float getDistanceJointDampingRatio | ( | jointId |  | ) |

Gets the damping ratio.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the damping ratio (-1 indicates error).

Float getDistanceJointFrequency | ( | jointId |  | ) |

Gets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the mass-spring-damper frequency in Hertz (-1 indicates error).

Float getDistanceJointLength | ( | jointId |  | ) |

Gets the distance the joint should maintain between scene objects.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the distance the joint should maintain between scene objects (-1 indicates error).

Float getFPS | ( |  | ) |

Gets the current average frames-per-second.

Returns
  The current average frames-per-second.

Integer getFrameCount | ( |  | ) |

Gets the current rendered frame count.

Returns
  The current rendered frame count.

Float getFrictionJointMaxForce | ( | jointId |  | ) |

Sets the maximum friction force.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the maximum friction force (-1 indicates error).

Float getFrictionJointMaxTorque | ( | jointId |  | ) |

Gets the maximum torque force.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the maximum torque force (-1 indicates error).

Integer getGlobalSceneCount | ( |  | ) |

Gets the system-wide scene count.

Returns
  The system-wide scene count.

String getGravity | ( |  | ) |

Gets the gravity force applied to all objects in the scene.

Returns
  The gravity force applied to all objects in the scene.

Integer getJointCount | ( |  | ) |

Gets the joint count.

Returns
  Returns no value

String getJointType | ( | int | jointId | ) |

Gets the joint type of the specified joint Id.

Parameters

  jointId | The Id of the joint.

Returns
  The type of joint of the specified joint Id.

String getLayerSortMode | ( | layer |  | ) |

Gets the render sort mode for the specified layer.

Parameters

  layer | The layer to retrieve.

Returns
  The render sort mode for the specified layer.

Float getMaxFPS | ( |  | ) |

Gets the maximum average frames-per-second.

Returns
  The average frames-per-second.

Float getMinFPS | ( |  | ) |

Gets the minimum average frames-per-second.

Returns
  The minimum Faverage frames-per-second.

Float getMotorJointAngularOffset | ( | jointId |  | ) |

Gets angularOffset between the bodies.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the angularOffset between the bodies (-1 indicates error).

String getMotorJointLinearOffset | ( | jointId |  | ) |

Gets the linear offset in sceneObjectA space.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the linear offset in sceneObjectA space (always 0,0 if error).

Float getMotorJointMaxForce | ( | jointId |  | ) |

Sets the maximum motor force.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the maximum motor force (-1 indicates error).

Float getMotorJointMaxTorque | ( | jointId |  | ) |

Gets the maximum motor torque force.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the maximum motor torque force (-1 indicates error).

Integer getObject | ( | sceneObjectIndex |  | ) |

Gets the scene object at the selected index.

Parameters

  sceneObjectIndex | The index of the desired object

Returns
  The scene object at the specified index.

Integer getPositionIterations | ( |  | ) |

Gets the number of position iterations the physics solver uses. (

Returns
  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.

Returns
  Returns whether the joint has translational limits or not and the limits themselves (empty string indicates error).

String getPrismaticJointMotor | ( | jointId |  | ) |

Gets whether the joint has a motor or not and the motor settings.

Returns
  Returns whether the joint has a motor or not and the motor settings (empty string indicates error).

Float getRevoluteJointAngle | ( | jointId |  | ) |

Gets the current angle of a revolute joint.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the joint angle.

String getRevoluteJointLimit | ( | jointId |  | ) |

Gets whether the joint has angular limits or not and the limits themselves.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns whether the joint has angular limits or not and the limits themselves (empty string indicates error).

String getRevoluteJointMotor | ( | jointId |  | ) |

Gets whether the joint has a motor or not and the motor settings.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns whether the joint has a motor or not and the motor settings (empty string indicates error).

Float getRevoluteJointSpeed | ( | jointId |  | ) |

Gets the current speed of a revolute joint.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the joint speed as Angular Velocity

Float getRopeJointMaxLength | ( | jointId |  | ) |

Gets the maximum rigid length of the rope.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the maximum rigid length of the rope (-1 indicates error).

String getSceneObjectList | ( |  | ) |

Gets the Scene Object-List.

Returns
  Returns a string with a list of object IDs

Boolean getScenePause | ( |  | ) |

Gets scene pause status.

Returns
  Returns a boolean value. True if pause status, false otherwise.

Float getSceneTime | ( |  | ) |

Gets the Scene Time.

Returns
  Returns the time as a floating point number

Float getTargetJointDampingRatio | ( | jointId |  | ) |

Sets the damping ratio.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the damping ratio (-1 indicates error).

Float getTargetJointFrequency | ( | jointId |  | ) |

Gets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the mass-spring-damper frequency in Hertz (-1 indicates error).

String getTargetJointTarget | ( | jointId |  | ) |

Gets the target world point for the scene object.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the target world point for the scene object (always 0,0 if error).

Integer getVelocityIterations | ( |  | ) |

Gets the number of velocity iterations the physics solver uses. (

Returns
  The number of velocity iterations the physics solver uses.

Float getWeldJointDampingRatio | ( | jointId |  | ) |

Gets the damping ratio.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the damping ratio (-1 indicates error).

Float getWeldJointFrequency | ( | jointId |  | ) |

Gets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the mass-spring-damper frequency in Hertz (-1 indicates error).

Float getWheelJointDampingRatio | ( | jointId |  | ) |

Gets the damping ratio.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the damping ratio (-1 indicates error).

Float getWheelJointFrequency | ( | jointId |  | ) |

Gets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns the mass-spring-damper frequency in Hertz (-1 indicates error).

String getWheelJointMotor | ( | jointId |  | ) |

Gets whether the joint has a motor or not and the motor settings.

Parameters

  jointId | The Id of the joint to use.

Returns
  Returns whether the joint has a motor or not and the motor settings (empty string indicates error).

Boolean isJoint | ( | int | jointId | ) |

Gets whether the joint Id is valid or not.

Parameters

  jointId | The Id of the joint.

Returns
  whether the joint Id is valid or not.

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.

Parameters

  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').

Returns
  Returns list of object IDs.

String pickCircle | ( | x/ | y,
|  | radius |
| ) |  |

Picks objects intersecting the specified circle with optional group/layer masks.

Parameters

  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').

Returns
  Returns list of object IDs.

String pickPoint | ( | x/ | y | ) |

Picks objects intersecting the specified point with optional group/layer masks.

Parameters

  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').

Returns
  Returns list of object IDs.

String pickRay | ( | startx/ | y,
|  | endx/ | y
| ) |  |

Picks objects intersecting the specified ray with optional group/layer masks.

Parameters

  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').

Returns
  Returns list of object IDs.

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.

Parameters

  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.

Returns
  Returns a list of objects in blocks of detail items where each block represents a single object and its collision detail in the format: <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> etc.

void remove | ( | sceneObject |  | ) |

Remove the SceneObject from the scene.

Parameters

  sceneObject | The SceneObject to remove from the scene.

Returns
  No return value.

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.

Parameters

  assetId | The asset Id to be removed.

Returns
  No return value.

void resetDebugStats | ( |  | ) |

Resets the debug statistics.

Returns
  No return value.

void setBatchingEnabled | ( | bool | enabled | ) |

Sets whether render batching is enabled or not.

Parameters

  enabled | Whether render batching is enabled or not. return No return value.

void setDebugOff | ( | debugOptions |  | ) |

Sets Debug options(s) off.

Parameters

  debugOptions | Either a list of debug modes to turn off (comma-separated) or a string (space-separated)

Returns
  No return value.

void setDebugOn | ( | debugOptions |  | ) |

Sets Debug option(s) on.

Parameters

  debugOptions | Either a list of debug modes (comma-separated), or a string with the modes (space-separated)

Returns
  No return value.

void setDebugSceneObject | ( | sceneObject |  | ) |

Sets the scene object to monitor in the debug metrics.

Parameters

  SceneObject | The scene object to monitor in the debug metrics.

Returns
  No return value.

void setDistanceJointDampingRatio | ( | jointId | ,
|  | dampingRatio |
| ) |  |

Sets the damping ratio.

Parameters

  jointId | The Id of the joint to use.
  dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping.

Returns
  Returns no value.

void setDistanceJointFrequency | ( | jointId | ,
|  | frequency |
| ) |  |

Sets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.
  frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness.

Returns
  Returns no value.

void setDistanceJointLength | ( | jointId | ,
|  | length |
| ) |  |

Sets the distance the joint should maintain between scene objects.

Parameters

  jointId | The Id of the joint to use.
  length | The length the joint should maintain between scene objects.

Returns
  Returns no value.

void setFrictionJointMaxForce | ( | jointId | ,
|  | maxForce |
| ) |  |

Sets the maximum friction force.

Parameters

  jointId | The Id of the joint to use.
  maxForce | The maximum friction force (N).

Returns
  Returns no value.

void setFrictionJointMaxTorque | ( | jointId | ,
|  | maxTorque |
| ) |  |

Sets the maximum torque force.

Parameters

  jointId | The Id of the joint to use.
  maxTorque | The maximum torque force (N).

Returns
  Returns no value.

void setGravity | ( | forceX/ | forceY | ) |

The gravity force to apply to all objects in the scene.

Parameters

  forceX/forceY | The direction and magnitude of the force in each direction. Formatted as either ( forceY\ or (forceX, forceY)

Returns
  No return value.

void setIsEditorScene | ( |  | ) |

Sets whether this is an editor scene.

Returns
  No return value.

void setLayerSortMode | ( | layer | ,
|  | sortMode |
| ) |  |

Sets the layer to use the specified render sort mode.

Parameters

  layer | The layer to modify.
  sortMode | The sort mode to use on the specified layer.

Returns
  No return value.

void setMotorJointAngularOffset | ( | jointId | ,
|  | angularOffset |
| ) |  |

Sets the angularOffset between the bodies.

Parameters

  jointId | The Id of the joint to use.
  angularOffset | The angularOffset between the bodies.

Returns
  Returns no value.

void setMotorJointLinearOffset | ( | jointId | ,
|  | linearOffset X/ | Y
| ) |  |

Sets the linear offset in sceneObjectA space.

Parameters

  jointId | The Id of the joint to use.
  linearOffsetX/Y | The linear offset in sceneObjectA space.

Returns
  Returns no value.

void setMotorJointMaxForce | ( | jointId | ,
|  | maxForce |
| ) |  |

Sets the maximum motor force.

Parameters

  jointId | The Id of the joint to use.
  maxForce | The maximum motor force (N).

Returns
  Returns no value.

void setMotorJointMaxTorque | ( | jointId | ,
|  | maxTorque |
| ) |  |

Sets the maximum motor torque force.

Parameters

  jointId | The Id of the joint to use.
  maxTorque | The maximum motor torque force (N).

Returns
  Returns no value.

void setPositionIterations | ( | int | iterations | ) |

Sets the number of position iterations the physics solver uses.

Returns
  No return value.

void setPrismaticJointLimit | ( | jointId | ,
|  | enableLimit |
| ) |  |

Sets whether the joint has translational limits or not and the limits themselves.

Parameters

  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.

Returns
  Returns no value.

void setPrismaticJointMotor | ( | jointId | ,
|  | enableMotor |
| ) |  |

Sets whether the joint has a motor or not and the motor settings.

Parameters

  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).

Returns
  Returns no value.

void setRevoluteJointLimit | ( | jointId | ,
|  | enableLimit |
| ) |  |

Sets whether the joint has angular limits or not and the limits themselves.

Parameters

  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.

Returns
  Returns no value.

void setRevoluteJointMotor | ( | jointId | ,
|  | enableMotor |
| ) |  |

Sets whether the joint has a motor or not and the motor settings.

Parameters

  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).

Returns
  Returns no value.

void setRopeJointMaxLength | ( | jointId | ,
|  | maxLength |
| ) |  |

Sets the maximum rigid length of the rope.

Parameters

  jointId | The Id of the joint to use.
  maxLength | The maximum rigid length of the rope.

Returns
  Returns no value.

void setScenePause | ( | status |  | ) |

Sets scene pause status.

Returns
  No return value.

void setTargetJointDampingRatio | ( | jointId | ,
|  | dampingRatio |
| ) |  |

Sets the damping ratio.

Parameters

  jointId | The Id of the joint to use.
  dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping.

Returns
  Returns no value.

void setTargetJointFrequency | ( | jointId | ,
|  | frequency |
| ) |  |

Sets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.
  frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness.

Returns
  Returns no value.

void setTargetJointTarget | ( | jointId | ,
|  | worldTarget X/ | Y
| ) |  |

Sets the target world point for the scene object.

Parameters

  jointId | The Id of the joint to use.
  worldTarget | The target world point to move the scene object to.

Returns
  Returns no value.

void setVelocityIterations | ( | int | iterations | ) |

Sets the number of velocity iterations the physics solver uses.

Returns
  No return value.

void setWeldJointDampingRatio | ( | jointId | ,
|  | dampingRatio |
| ) |  |

Sets the damping ratio.

Parameters

  jointId | The Id of the joint to use.
  dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping.

Returns
  Returns no value.

void setWeldJointFrequency | ( | jointId | ,
|  | frequency |
| ) |  |

Sets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.
  frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness.

Returns
  Returns no value.

void setWheelJointDampingRatio | ( | jointId | ,
|  | dampingRatio |
| ) |  |

Sets the damping ratio.

Parameters

  jointId | The Id of the joint to use.
  dampingRatio | The damping ratio. 0 = no damping, 1 = critical damping.

Returns
  Returns no value.

void setWheelJointFrequency | ( | jointId | ,
|  | frequency |
| ) |  |

Sets the mass-spring-damper frequency in Hertz.

Parameters

  jointId | The Id of the joint to use.
  frequency | The mass-spring-damper frequency in Hertz. A value of 0 disables softness.

Returns
  Returns no value.

void setWheelJointMotor | ( | jointId | ,
|  | enableMotor |
| ) |  |

Sets whether the joint has a motor or not and the motor settings.

Parameters

  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).

Returns
  Returns no value.