TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

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

Public Member Functions | List of all members
SceneObject Class Reference

Inherits BehaviorComponent.

Inherited by CompositeSprite, ImageFont, ParticlePlayer, ShapeVector, SkeletonObject, SpriteBase, Trigger, and WaveComposite.

## Public Member Functions
void | addToScene (Scene scene)
void | applyAngularImpulse (impulse)
void | applyForce (worldForce X/Y, [worldPoint X/Y])
void | applyLinearImpulse (worldImpulse X/Y, [worldPoint X/Y])
void | applyTorque (torque)
void | attachGui (guiControl guiObject, SceneWindow window, [sizeControl?=false])
void | cancelFadeTo ()
void | cancelGrowTo ()
void | cancelMoveTo ([autoStop=true])
void | cancelRotateTo ([autoStop=true])
void | clearCollisionShapes ()
void | copyAllCollisionShapes (targetObject[, clearTargetShapes?])
Integer | copyCollisionShape (int shapeIndex, targetObject)
Boolean | copyFrom (SceneObject object, [copyDynamicFields?=false])
Integer | createChainCollisionShape (localPointsX/Y, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
Integer | createCircleCollisionShape (radius, [localPositionX, localPositionY])
Integer | createEdgeCollisionShape (localPositionStartX, localPositionStartY, localPositionEndX, localPositionEndY, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
Integer | createPolygonBoxCollisionShape (width, height, [localCentroidX, localCentroidY], [angle])
Integer | createPolygonCollisionShape (localPointsX/Y)
Boolean | deleteCollisionShape (int shapeIndex)
void | detachGui ()
Boolean | fadeTo (targetColor red/green/blue/alpha, rate)
Boolean | fadeToTime (targetColor red/green/blue/alpha, time)
String | getAABB ()
Boolean | getActive ()
Float | getAlphaTest ()
Float | getAngle ()
Float | getAngularDamping ()
Float | getAngularVelocity ()
String | getArea ()
String | getAreaMax (...)
String | getAreaMin ()
Boolean | getAutoSizing ()
Boolean | getAwake ()
Float | getBlendAlpha ()
String | getBlendColor (allowColorNames)
Boolean | getBlendMode ()
String | getBodyType ()
Boolean | getBullet ()
String | getChainCollisionShapeAdjacentEnd (int shapeIndex)
String | getChainCollisionShapeAdjacentStart (int shapeIndex)
Boolean | getChainCollisionShapeHasAdjacentEnd (int shapeIndex)
Boolean | getChainCollisionShapeHasAdjacentStart (int shapeIndex)
String | getChainCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
Integer | getChainCollisionShapePointCount (int shapeIndex)
String | getCircleCollisionShapeLocalPosition (int shapeIndex)
Float | getCircleCollisionShapeRadius (int shapeIndex)
Boolean | getCollisionCallback ()
String | getCollisionGroups ()
String | getCollisionLayers ()
String | getCollisionMasks (...)
Boolean | getCollisionOneWay ()
Float | getCollisionShapeArea (int shapeIndex)
Integer | getCollisionShapeCount ()
Float | getCollisionShapeDensity (int shapeIndex)
Float | getCollisionShapeFriction (int shapeIndex)
Boolean | getCollisionShapeIsSensor (int shapeIndex)
Float | getCollisionShapeRestitution (int shapeIndex)
String | getCollisionShapeType (int shapeIndex)
Boolean | getCollisionSuppress ()
String | getContact (contactIndex)
Integer | getContactCount ()
Float | getDefaultDensity ()
Float | getDefaultFriction ()
Float | getDefaultRestitution ()
String | getDstBlendFactor ()
String | getEdgeCollisionShapeAdjacentEnd (int shapeIndex)
String | getEdgeCollisionShapeAdjacentStart (int shapeIndex)
Boolean | getEdgeCollisionShapeHasAdjacentEnd (int shapeIndex)
Boolean | getEdgeCollisionShapeHasAdjacentStart (int shapeIndex)
String | getEdgeCollisionShapeLocalPositionEnd (int shapeIndex)
String | getEdgeCollisionShapeLocalPositionStart (int shapeIndex)
Boolean | getFixedAngle ()
Boolean | getGatherContacts ()
Float | getGravityScale ()
Float | getHeight ()
Float | getInertia ()
Boolean | getIsPointInCollisionShape (int shapeIndex, worldPointX/Y)
Boolean | getIsPointInOOBB (worldPointX/Y)
Float | getLifetime ()
Float | getLinearDamping ()
String | getLinearVelocity ()
String | getLinearVelocityFromLocalPoint (localPointX/Y)
String | getLinearVelocityFromWorldPoint (worldPointX/Y)
String | getLinearVelocityPolar ()
Float | getLinearVelocityX ()
Float | getLinearVelocityY ()
String | getLocalCenter ()
String | getLocalPoint (float worldPointX/Y)
String | getLocalVector (float worldVectorX/Y)
Float | getMass ()
Boolean | getPickingAllowed ()
String | getPolygonCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
Integer | getPolygonCollisionShapePointCount (int shapeIndex)
String | getPosition ()
Float | getPositionX ()
Float | getPositionY ()
Float | getRenderAngle ()
String | getRenderGroup ()
String | getRenderPosition ()
Integer | getScene ()
Integer | getSceneGroup ()
Integer | getSceneLayer ()
Float | getSceneLayerDepth ()
String | getSize ()
Float | getSizeX ()
Float | getSizeY ()
Boolean | getSleepingAllowed ()
Boolean | getSleepingCallback ()
String | getSortPoint ()
Float | getSortPointX ()
Float | getSortPointY ()
String | getSrcBlendFactor ()
Boolean | getUpdateCallback ()
Boolean | getUseInputEvents ()
Boolean | getVisible ()
Float | getWidth ()
String | getWorldCenter ()
String | getWorldPoint (float localPointX/Y)
String | getWorldVector (float localVectorX/Y)
Boolean | growTo (targetSize width/height, rate rateX/rateY)
Boolean | growToTime (targetSize width/height, time)
Boolean | isFadeToComplete ()
Boolean | isGrowToComplete ()
Boolean | isMoveToComplete ()
Boolean | isRotateToComplete ()
Boolean | moveTo (worldPoint X/Y, speed, [autoStop=true], [snapToTarget=true], [margin=0.1])
void | removeFromScene ()
Boolean | rotateTo (angle, speed, [autoStop=true], [warpToTarget=true])
void | safeDelete ()
void | setActive ([bool status?])
void | setAlphaTest (float alpha)
void | setAngle (float angle)
void | setAngularDamping (float damping)
void | setAngularVelocity (float velocity)
void | setArea (float x1, float y1, float x2, float y2)
void | setAwake ([bool status?])
void | setBlendAlpha (float alpha)
void | setBlendColor (float red, float green, float blue, [float alpha=1.0])
void | setBlendMode (bool blendMode)
void | setBodyType (bodyType type)
void | setBullet ([bool status?])
void | setCollisionAgainst (SceneObject object, [clearMasks?=false])
void | setCollisionCallback ([bool status?])
void | setCollisionGroups (groups)
void | setCollisionLayers (layers)
void | setCollisionMasks (groupMask, [layerMask])
void | setCollisionOneWay ([bool status?])
void | setCollisionShapeDensity (int shapeIndex, float density)
void | setCollisionShapeFriction (int shapeIndex, float friction)
void | setCollisionShapeIsSensor (int shapeIndex, bool status)
void | setCollisionShapeRestitution (int shapeIndex, float restitution)
void | setCollisionSuppress ([bool status?])
void | setDebugOff (debugOptions)
void | setDebugOn (debugOptions)
void | setDefaultDensity (float density, [bool updateShapes])
void | setDefaultFriction (float friction, [bool updateShapes])
void | setDefaultRestitution (float restitution, [bool updateShapes])
void | setDstBlendFactor (dstBlend)
void | setEnabled (bool status)
void | setFixedAngle (bool status?)
void | setGatherContacts (bool gatherContacts)
void | setGravityScale (float scale)
void | setHeight (float height)
void | setLifetime (float lifetime)
void | setLinearDamping (float damping)
void | setLinearVelocity (float velocityX, float velocityY)
void | setLinearVelocityPolar (float angle, float speed)
void | setLinearVelocityX (float velocityX)
void | setLinearVelocityY (float velocityY)
void | setPickingAllowed (bool pickingAllowed)
void | setPosition (float x, float y)
void | setPositionX (float x)
void | setPositionY (float y)
void | setRenderGroup (renderGroup)
void | setSceneGroup (integer group)
void | setSceneLayer (integer layer)
void | setSceneLayerDepth (float layerDepth)
Boolean | setSceneLayerDepthBack ()
Boolean | setSceneLayerDepthBackward ()
Boolean | setSceneLayerDepthForward ()
Boolean | setSceneLayerDepthFront ()
void | setSize (float width, float height)
void | setSizeX (float width)
void | setSizeY (float height)
void | setSleepingAllowed ([bool status?])
void | setSleepingCallback ([bool status?])
void | setSortPoint (float x, float y)
void | setSortPointX (float x)
void | setSortPointY (float y)
void | setSrcBlendFactor (srcBlend)
void | setUpdateCallback ([bool status?])
void | setUseInputEvents (bool inputStatus)
void | setVisible (bool status)
void | setWidth (float width)
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 addToScene | ( | Scene | scene | ) |

Add the object to a scene.

Parameters

  scene | the scene you wish to add this object to.

Returns
  No return value.

void applyAngularImpulse | ( | impulse |  | ) |

Applies an angular impulse.

Parameters

  impulse | - The impulse in Kg*m*m/s.

Returns
  No return Value.

void applyForce | ( | worldForce X/ | Y | ) |

Applies a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity.

Parameters

  worldForceX/Y | - The world force vector in Newtons (N).
  worldPointX/Y | - The world point where the force is applied. If world point is not specified, the center of mass is used.

Returns
  No return Value.

void applyLinearImpulse | ( | worldImpulse X/ | Y | ) |

Applies an impulse at a world point. This immediately modifies the linear velocity. It also modifies the angular velocity if the point of application is not the center of mass.

Parameters

  worldImpulse/Y | - The world impulse vector in Newtons (N-seconds) or Kg-m/s.
  worldPointX/Y | - The world point where the force is applied. If world point is not specified, the center of mass is used.

Returns
  No return Value.

void applyTorque | ( | torque |  | ) |

Applies a torque. This affects the angular velocity without affecting the linear velocity of the center of mass.

Parameters

  torque | - The torque in Newton-metres (N-m).

Returns
  No return Value.

void attachGui | ( | guiControl | guiObject,
|  | SceneWindow | window
| ) |  |

Attach a GUI Control to the object.

Parameters

  guiObject | The GuiControl to attach.
  window | The SceneWindow to bind the GuiControl to.
  sizeControl | Whether or not to size the GuiControl to the size of this object.

Returns
  No return Value.

void cancelFadeTo | ( |  | ) |

Stop a previous 'fadeTo' command.

Returns
  No return value.

void cancelGrowTo | ( |  | ) |

Stop a previous 'growTo' command.

Returns
  No return value.

void cancelMoveTo | ( |  | ) |

Stop a previous 'moveTo' command.

Parameters

  autoStop? | - Whether to automatically set the linear velocity to zero or not

Returns
  No return value.

void cancelRotateTo | ( |  | ) |

Stop a previous 'rotateTo' command.

Parameters

  autoStop? | - Whether to automatically set the angular velocity to zero or not

Returns
  No return value.

void clearCollisionShapes | ( |  | ) |

Deletes all collision shapes.

Returns
  No return value.

void copyAllCollisionShapes | ( | targetObject | [, clearTargetShapes?] | ) |

Copies all collision shapes to the target object.

Parameters

  targetObject | - The target object to receive the collision shapes.
  clearTargetShapes | - Whether to clear the current collision shapes on the target or not. Optional: Defaults to true.

Returns
  No return value.

Integer copyCollisionShape | ( | int | shapeIndex,
|  | targetObject |
| ) |  |

Copies a collision shape at the specified index to the target object.

Parameters

  shapeIndex | - The index of the collision shape.
  targetObject | - The target object to receive the collision shape copy.

Returns
  The shape index of the copied collision shape on the target object or (-1) if not copied.

Boolean copyFrom | ( | SceneObject | object | ) |

Copies one scene object from another scene object. The object being copied to needs to be of the same class as the object being copied from.

Parameters

  object | The SceneObject to copy this object to.
  copyDynamicFields | Whether the dynamic fields should be copied or not. Optional: Defaults to false.

Returns
  (bool) Whether or not the copy was successful.

Integer createChainCollisionShape | ( | localPointsX/ | Y | ) |

Creates a chain collision shape.

Parameters

  localPointsX/Y | A space separated list of local points for the chain collision shape (must be at least two points).
  adjacentLocalPositionStartXY | The adjacent local position of the start of the edge.
  adjacentLocalPositionEndXY | The adjacent local position of the end of the edge.

Returns
  (int shapeIndex) The index of the collision shape or (-1) if not created.

Integer createCircleCollisionShape | ( | radius |  | ) |

Creates a circle collision shape.

Parameters

  radius | The radius of the circle.

Returns
  (int shapeIndex) The index of the collision shape or (-1) if not created.

Integer createEdgeCollisionShape | ( | localPositionStartX | ,
|  | localPositionStartY | ,
|  | localPositionEndX | ,
|  | localPositionEndY |
| ) |  |

Creates an edge collision shape.

Parameters

  localPositionStartXY | The local position of the start of the edge.
  localPositionEndXY | The local position of the end of the edge.
  adjacentLocalPositionStartXY | The adjacent local position of the start of the edge.
  adjacentLocalPositionEndXY | The adjacent local position of the end of the edge.

Returns
  (int shapeIndex) The index of the collision shape or (-1) if not created.

Integer createPolygonBoxCollisionShape | ( | width | ,
|  | height |
| ) |  |

Creates a polygon box collision shape.

Parameters

  width | The width of the box.
  height | The height of the box.
  localCentroidX/Y | The local position of the box centroid.
  angle | The angle of the box.

Returns
  (int shapeIndex) The index of the collision shape or (-1) if not created.

Integer createPolygonCollisionShape | ( | localPointsX/ | Y | ) |

Creates a convex polygon collision shape.

Parameters

  localPointsX/Y | A space separated list of local points for the convex polygon collision shape (must be at least three points).

Returns
  (int shapeIndex) The index of the collision shape or (-1) if not created.

Boolean deleteCollisionShape | ( | int | shapeIndex | ) |

Deletes the specified collision shape.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  Whether the collision shape was successfully deleted or not.

void detachGui | ( |  | ) |

Detach any GUI Control.

Returns
  No return Value.

Boolean fadeTo | ( | targetColor red/green/blue/ | alpha,
|  | rate |
| ) |  |

Fades the object to the target color. The current color of the object will continue to change until it arrives at the target color or the fade is cancelled. The change will continue even if the blendColor is set directly.

Parameters

  (red | / green / blue / alpha) The target color to fade the object to.
  rate | The rate per second to change each color value. Must be a number greater than zero.

Returns
  Whether the fade started or not.

Boolean fadeToTime | ( | targetColor red/green/blue/ | alpha,
|  | time |
| ) |  |

Fades the object to the target color over a period of time. The current color of the object will continue to change until it arrives at the target color or the fade is cancelled. The change will continue even if the blendColor is set directly which will change the amount of time it takes. Unhindered, each of the color values will arrive at the target in approximately the target time.

Parameters

  (red | / green / blue / alpha) The target color to fade the object to.
  time | The amount of time in milliseconds that each color value will take to reach the target. Must be a number greater than zero.

Returns
  Whether the fade started or not.

String getAABB | ( |  | ) |

Gets the axis-aligned bounding-box of the object.

Returns
  (lowerXY upperXY) A space separated list of the lower left and upper right bounds.

Boolean getActive | ( |  | ) |

Gets the body active status.

Returns
  (bool status) Whether the body is active or not.

Float getAlphaTest | ( |  | ) |

Gets the render alpha test threshold.

Returns
  The render alpha test threshold in the range of 0.0f to 1.0. Less than zero represents disabled alpha testing.

Float getAngle | ( |  | ) |

Gets the object's angle.

Returns
  (float angle) The object's current angle.

Float getAngularDamping | ( |  | ) |

Gets the angular damping.

Returns
  (float damping) The angular damping.

Float getAngularVelocity | ( |  | ) |

Gets Object Angular Velocity.

Returns
  (float velocity) The speed at which the object is rotating.

String getArea | ( |  | ) |

Gets the object's area.

Returns
  (float x1/float y1/float x2/float y2) A space separated list of the lower left corner x and y position and the upper right corner x and y positions.

String getAreaMax | ( |  | ... | ) |

Gets the lower right point of the object.

Returns
  (float x2/float y2) The upper right corner x and y position of the object.

String getAreaMin | ( |  | ) |

Gets the upper left point of the object.

Returns
  (float x1/float y1) The lower left corner x and y position of the object.

Boolean getAutoSizing | ( |  | ) |

Gets whether the object automatically sizes itself or not. You cannot set the size of an object that automatically sizes itself.

Returns
  Whether the object automatically sizes itself or not.

Boolean getAwake | ( |  | ) |

Gets whether the body is awake or not.

Returns
  (bool status) Whether the body is awake or not.

Float getBlendAlpha | ( |  | ) |

Gets the Rendering Alpha (transparency).

Returns
  (float alpha) The alpha value, a range from 0.0 to 1.0. Less than zero if alpha testing is disabled.

String getBlendColor | ( | allowColorNames |  | ) |

Gets the Rendering Blend color.

Parameters

  allowColorNames | Whether to allow stock color names to be returned or not. Optional: Defaults to false.

Returns
  (float red / float green / float blue / float alpha) The sprite blend color.

Boolean getBlendMode | ( |  | ) |

Gets whether blending is on or not.

Returns
  (bool blendMode) Whether blending is on or not.

String getBodyType | ( |  | ) |

Gets the body type.

Returns
  The body type.

Boolean getBullet | ( |  | ) |

Gets whether the body is a bullet or not.

Returns
  (bool status) Whether the body is a bullet or not.

String getChainCollisionShapeAdjacentEnd | ( | int | shapeIndex | ) |

Gets whether the chain collision shape at the specified index has an adjacent end point or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (bool adjacentEnd) Whether the chain collision shape at the specified index has an adjacent end point or not.

String getChainCollisionShapeAdjacentStart | ( | int | shapeIndex | ) |

Gets the adjacent start point of the chain collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (adjacentStartPointXY) The adjacent start point of the chain collision shape at the specified index.

Boolean getChainCollisionShapeHasAdjacentEnd | ( | int | shapeIndex | ) |

Gets whether the chain collision shape at the specified index has an adjacent end point or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (bool adjacentEnd) Whether the chain collision shape at the specified index has an adjacent end point or not.

Boolean getChainCollisionShapeHasAdjacentStart | ( | int | shapeIndex | ) |

Gets whether the chain collision shape at the specified index has an adjacent start point or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (bool adjacentStart) Whether the chain collision shape at the specified index has an adjacent start point or not.

String getChainCollisionShapeLocalPoint | ( | int | shapeIndex,
|  | int | pointIndex
| ) |  |

Gets the local point of a polygon collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.
  pointIndex | - The index of the local point.

Returns
  (localPointXY) The local point of a polygon collision shape at the specified index.

Integer getChainCollisionShapePointCount | ( | int | shapeIndex | ) |

Gets the point count of a chain collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (int pointCount) The point count of a chain collision shape at the specified index or (0) if an invalid shape.

String getCircleCollisionShapeLocalPosition | ( | int | shapeIndex | ) |

Gets the local position of a circle collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (localPositionXY) The local position of a circle collision shape at the specified index.

Float getCircleCollisionShapeRadius | ( | int | shapeIndex | ) |

Gets the radius of a circle collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (F32 radius) The radius of a circle collision shape at the specified index or (0) if an invalid shape.

Boolean getCollisionCallback | ( |  | ) |

Gets whether the 'Scene::onCollision' callback is called or not.

Returns
  (bool status) the 'Scene::onCollision' callback is called or not.

String getCollisionGroups | ( |  | ) |

Gets the collision groups.

Returns
  (collisionGroups) A list of collision groups.

String getCollisionLayers | ( |  | ) |

Gets the collision layers.

Returns
  (collisionLayers) A list of collision layers.

String getCollisionMasks | ( |  | ... | ) |

Gets the collision group/layer masks.

Returns
  (groupMask/layerMask) The scene group(s) and scene layer(s) the object is enabled to collide with.

Boolean getCollisionOneWay | ( |  | ) |

Gets the one way collision status for chain and edge shapes that belong to this object.

Returns
  (bool status) Whether collisions happen only in one direction or not.

Float getCollisionShapeArea | ( | int | shapeIndex | ) |

Gets the area of collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (area) The area of collision shape at the specified index.

Integer getCollisionShapeCount | ( |  | ) |

Gets the number of collision shapes.

Returns
  (int count) The number of collision shapes.

Float getCollisionShapeDensity | ( | int | shapeIndex | ) |

Gets the density of the collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  The density of the collision shape at the specified index (-1 if error).

Float getCollisionShapeFriction | ( | int | shapeIndex | ) |

Gets the friction of the collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  The friction of the collision shape at the specified index (-1 if error).

Boolean getCollisionShapeIsSensor | ( | int | shapeIndex | ) |

Gets whether the collision shape at the specified index is a sensor or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  Whether the collision shape at the specified index is a sensor or not.

Float getCollisionShapeRestitution | ( | int | shapeIndex | ) |

Gets the restitution of the collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  The restitution of the collision shape at the specified index (-1 if error).

String getCollisionShapeType | ( | int | shapeIndex | ) |

Gets the type of collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (type) The type of collision shape at the specified index.

Boolean getCollisionSuppress | ( |  | ) |

Gets the collision suppress status.

Returns
  (bool status) Whether to supress the collision or not.

String getContact | ( | contactIndex |  | ) |

Gets the contact at the specified contact index.

Parameters

  contactIndex | The contact at the specified index.

Returns
  The contact at the specified index.

Integer getContactCount | ( |  | ) |

Gets the current contact count. This will always be zero if contact gathering is off.

Returns
  (int count) - Gets the current contact count.

Float getDefaultDensity | ( |  | ) |

Gets the default density.

Returns
  (float density) The default density.

Float getDefaultFriction | ( |  | ) |

Gets the default friction.

Returns
  (float friction) The default friction.

Float getDefaultRestitution | ( |  | ) |

Gets the default restitution.

Returns
  (float density) The default restitution.

String getDstBlendFactor | ( |  | ) |

Gets the destination blend factor.

Returns
  (dstBlend) The destination blend factor.

String getEdgeCollisionShapeAdjacentEnd | ( | int | shapeIndex | ) |

Gets whether the edge collision shape at the specified index has an adjacent end point or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (bool adjacentEnd) Whether the edge collision shape at the specified index has an adjacent end point or not.

String getEdgeCollisionShapeAdjacentStart | ( | int | shapeIndex | ) |

Gets the adjacent start point of the edge collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (adjacentStartPointXY) The adjacent start point of the edge collision shape at the specified index.

Boolean getEdgeCollisionShapeHasAdjacentEnd | ( | int | shapeIndex | ) |

Gets whether the edge collision shape at the specified index has an adjacent end point or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (bool adjacentEnd) Whether the edge collision shape at the specified index has an adjacent end point or not.

Boolean getEdgeCollisionShapeHasAdjacentStart | ( | int | shapeIndex | ) |

Gets whether the chain collision shape at the specified index has an adjacent start point or not.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (bool adjacentStart) Whether the chain collision shape at the specified index has an adjacent start point or not.

String getEdgeCollisionShapeLocalPositionEnd | ( | int | shapeIndex | ) |

Gets the local position end of the edge collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (localPositionEndXY) The local position end of the edge collision shape at the specified index.

String getEdgeCollisionShapeLocalPositionStart | ( | int | shapeIndex | ) |

Gets the local position start of the edge collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (localPositionStartXY) The local position start of the edge collision shape at the specified index.

Boolean getFixedAngle | ( |  | ) |

Gets whether the angle is fixed or not.

Returns
  (bool status?) Whether the angle is fixed or not.

Boolean getGatherContacts | ( |  | ) |

Gets whether the gathering of contacts is active or not.

Returns
  Whether the gathering of contacts is active or not.

Float getGravityScale | ( |  | ) |

Gets the gravity scale.

Returns
  (float scale) The gravity scale.

Float getHeight | ( |  | ) |

Gets the height of the object.

Returns
  (float height) The height of the object.

Float getInertia | ( |  | ) |

Gets the rotation inertia of the body around the local origin.

Returns
  (float inertia) rotation inertia of the body around the local origin (Kg-m^2). If object is not in a scene then mass is always zero.

Boolean getIsPointInCollisionShape | ( | int | shapeIndex,
|  | worldPointX/ | Y
| ) |  |

Returns whether the world point intersects with the specified collision shape or not.

Parameters

  worldPointX/Y | The world point to check.
  shapeIndex | - The index of the collision shape.

Returns
  (bool isInside) Whether the world point intersects with the specified collision shape or not.

Boolean getIsPointInOOBB | ( | worldPointX/ | Y | ) |

Returns whether the world point intersects with the objects OOBB or not.

Parameters

  worldPointX/Y | The world point to check.

Returns
  (bool isInside) Whether the world point intersects with the objects OOBB or not.

Float getLifetime | ( |  | ) |

Gets the Objects Lifetime.

Returns
  (float lifetime) The objects lifetime left before it is automatically deleted.

Float getLinearDamping | ( |  | ) |

Gets the linear damping.

Returns
  (float damping) The linear damping.

String getLinearVelocity | ( |  | ) |

Gets Object Linear Velocity.

Returns
  (float velocityX, float velocityY) The x and y velocities of the object.

String getLinearVelocityFromLocalPoint | ( | localPointX/ | Y | ) |

Gets the linear velocity from a local point.

Returns
  (float linearVelocityX/Y) The linear velocity at the local point.

String getLinearVelocityFromWorldPoint | ( | worldPointX/ | Y | ) |

Gets the linear velocity from a world point.

Returns
  (float linearVelocityX/Y) The linear velocity at the world point.

String getLinearVelocityPolar | ( |  | ) |

Gets Objects Linear Velocity using Polar angle/speed.

Returns
  (float angle, float speed) The angle and speed the object is moving at.

Float getLinearVelocityX | ( |  | ) |

Gets Object Linear Velocity X.

Returns
  (float velocityX) The object's velocity along the x axis.

Float getLinearVelocityY | ( |  | ) |

Gets Object Linear Velocity Y.

Returns
  (float velocityY) The object's velocity along the y axis.

String getLocalCenter | ( |  | ) |

Gets the local center of mass.

Returns
  (float localCenter) Gets the local center of mass.

String getLocalPoint | ( | float worldPointX/ | Y | ) |

Returns a local point from the world point. Converts a point in world space to local space.

Parameters

  worldPointX/Y | The world point to convert into a local point.

Returns
  (float localPointX/Y) The local point that was converted from the world point passed.

String getLocalVector | ( | float worldVectorX/ | Y | ) |

Returns a local vector from the world vector. Converts a vector in world space to local space.

Parameters

  worldVectorX/Y | The world vector to convert into a vector point.

Returns
  (float localVectorX/Y) The local vector that was converted from the world vector passed.

Float getMass | ( |  | ) |

Gets the total mass of the body.

Returns
  (float mass) The total mass of the body. If object is not in a scene then mass is always zero.

Boolean getPickingAllowed | ( |  | ) |

Gets whether picking is allowed or not.

Returns
  Whether picking is allowed or not.

String getPolygonCollisionShapeLocalPoint | ( | int | shapeIndex,
|  | int | pointIndex
| ) |  |

Gets the local point of a polygon collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.
  pointIndex | - The index of the local point.

Returns
  (localPointXY) The local point of a polygon collision shape at the specified index.

Integer getPolygonCollisionShapePointCount | ( | int | shapeIndex | ) |

Gets the point count of a polygon collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.

Returns
  (int pointCount) The point count of a polygon collision shape at the specified index or (0) if an invalid shape.

String getPosition | ( |  | ) |

Gets the object's position.

Returns
  (float x/float y) The x and y (horizontal and vertical) position of the object.

Float getPositionX | ( |  | ) |

Gets the object's position.

Returns
  The x (horizontal) position of the object.

Float getPositionY | ( |  | ) |

Gets the object's position.

Returns
  The y (vertical) position of the object.

Float getRenderAngle | ( |  | ) |

Gets the object's render angle.

Returns
  (float rotation) The object's current render angle.

String getRenderGroup | ( |  | ) |

Gets the name of the render group used to sort the object during rendering.

Returns
  The render group used to sort the object during rendering.

String getRenderPosition | ( |  | ) |

Gets the current render position.

Returns
  (float x/float y) The x and y (horizontal and vertical) render position of the object.

Integer getScene | ( |  | ) |

Get the scene the object is in.

Returns
  (Scene scene) The scene this object is currently in.

Integer getSceneGroup | ( |  | ) |

Gets the Objects Group.

Returns
  (integer group) The scene group the object is on.

Integer getSceneLayer | ( |  | ) |

Gets the Objects Layer.

Returns
  (integer layer) The scene layer the object is on.

Float getSceneLayerDepth | ( |  | ) |

Gets the scene layer depth.

Returns
  (float layerDepth) The scene layer depth.

String getSize | ( |  | ) |

Gets the objects size.

Returns
  (float width/float height) The width and height of the object.

Float getSizeX | ( |  | ) |

Gets the width of the object.

Returns
  (float width) The width of the object.

Float getSizeY | ( |  | ) |

Gets the height of the object.

Returns
  (float height) The height of the object.

Boolean getSleepingAllowed | ( |  | ) |

Gets whether the body is allowed to sleep or not.

Returns
  (bool status) Whether the body is allowed to sleep or not.

Boolean getSleepingCallback | ( |  | ) |

Gets whether the 'onWake' and 'onSleep' callbacks are called or not when the object changes sleep state.

Returns
  (bool status ) Whether the 'onWake' and 'onSleep' callbacks are called or not.

String getSortPoint | ( |  | ) |

Gets the layer draw order sorting point.

Returns
  (float x/float y) The local x and y position of the sort point.

Float getSortPointX | ( |  | ) |

Gets the x component of the layer draw order sorting point.

Returns
  (float x) The local x position of the sort point.

Float getSortPointY | ( |  | ) |

Gets the y component of the layer draw order sorting point.

Returns
  (float y) The local y position of the sort point.

String getSrcBlendFactor | ( |  | ) |

Gets the source blend factor.

Returns
  (srcBlend) The source blend factor.

Boolean getUpdateCallback | ( |  | ) |

Gets whether the 'onUpdate' callback is called or not.

Returns
  (bool status ) Whether the 'onUpdate' callback is called or not.

Boolean getUseInputEvents | ( |  | ) |

Gets whether input events are passed from the scene window are monitored by this object or not.

Returns
  (bool inputStatus) Whether input events are passed from the scene window are monitored by this object or not.

Boolean getVisible | ( |  | ) |

Gets the object's visible status.

Returns
  (bool status) Whether or not the object is visible.

Float getWidth | ( |  | ) |

Gets the width of the object.

Returns
  (float width) The width of the object.

String getWorldCenter | ( |  | ) |

Gets the world center of mass.

Returns
  (float worldCenter) Gets the world center of mass.

String getWorldPoint | ( | float localPointX/ | Y | ) |

Returns a world point from the local point. Converts a point in local space to world space.

Parameters

  localPointX/Y | The local point to convert into a world point.

Returns
  (float worldPointX/Y) The world point that was converted from the local point passed.

String getWorldVector | ( | float localVectorX/ | Y | ) |

Returns a world vector from the local vector. Converts a vector in local space to world space.

Parameters

  localVectorX/Y | The local vector to convert into a world vector.

Returns
  (float worldVectorX/Y) The world vector that was converted from the local vector passed.

Boolean growTo | ( | targetSize width/ | height,
|  | rate rateX/ | rateY
| ) |  |

Grows or shrinks the object to the target size. The current size of the object will continue to change until it arrives at the target size or the grow is cancelled. The change will continue even if the size is set directly.

Parameters

  (width | / height) The target size to grow or shrink the object to.
  (rateX | / rateY) The rate per second to change the size. Must be a number greater than zero even if shrinking. Can be one or two values.

Returns
  Whether the grow started or not.

Boolean growToTime | ( | targetSize width/ | height,
|  | time |
| ) |  |

Grows or shrinks the object to the target size over a period of time. The current size of the object will continue to change until it arrives at the target size or the grow is cancelled. The change will continue even if the size is set directly which will change the amount of time it takes. Unhindered, both size values will arrive at the target in approximately the target time.

Parameters

  (width | / height) The target size to grow or shrink the object to.
  time | The amount of time in milliseconds that both size values will take to reach the target. Must be a number greater than zero.

Returns
  Whether the fade started or not.

Boolean isFadeToComplete | ( |  | ) |

Gets whether a previous 'fadeTo' command has completed or not.

Returns
  No return value.

Boolean isGrowToComplete | ( |  | ) |

Gets whether a previous 'growTo' command has completed or not.

Returns
  No return value.

Boolean isMoveToComplete | ( |  | ) |

Gets whether a previous 'moveTo' command has completed or not.

Returns
  No return value.

Boolean isRotateToComplete | ( |  | ) |

Gets whether a previous 'rotateTo' command has completed or not.

Returns
  No return value.

Boolean moveTo | ( | worldPoint X/ | Y,
|  | speed |
| ) |  |

Moves the object to the specified world point. Linear velocity is applied to the object at the given speed in the direction of the target world point. The object may never reach the point if other forces act on the target such as collisions. If the object moves away from the target the object will stop checking to see if it has arrived at the target.

Parameters

  worldPointX/Y | The world point to move the object to.
  speed | The speed (in m/s) to use to move to the specified point.
  autoStop? | Whether to automatically set the linear velocity to zero when the object arrives at the target.
  snapToTarget? | Whether to snap the object to the target point when it is within the margin.
  margin? | The distance from the target that qualifies as reaching the target.

Returns
  Whether the move could be started or not.

void removeFromScene | ( |  | ) |

Remove the object from the scene.

Returns
  No return value.

Boolean rotateTo | ( | angle | ,
|  | speed |
| ) |  |

Rotates the object to the specified angle. The angle is rotated to by calculating the initial angular velocity required and applies it. The object may never reach the point if it has angular damping applied or collides with another object.

Parameters

  angle | The angle to rotate the object to.
  speed | The speed (in degree/s) to use to rotate to the specified angle.
  autoStop? | Whether to automatically set the angular velocity to zero when time has elapsed or not
  warpToTarget? | Whether to rotate instantly to the target angle after the specified time or not in-case the target was not quite reached.

Returns
  Whether the rotation could be started or not.

void safeDelete | ( |  | ) |

Safely deletes object.

Returns
  No return Value.

void setActive | ( |  | ) |

Sets the body active status.

Parameters

  status | - Whether the body should be active or not (defaults to true).

Returns
  No return Value.

void setAlphaTest | ( | float | alpha | ) |

Set the render alpha test threshold.

Parameters

  alpha | The alpha test threshold in the range of 0.0 to 1.0. Less than zero to disable alpha testing.

Returns
  No return value.

void setAngle | ( | float | angle | ) |

Sets the objects angle.

Parameters

  angle | The angle of the object.

Returns
  No return value.

void setAngularDamping | ( | float | damping | ) |

Sets the angular damping.

Parameters

  damping | - The angular damping scale.

Returns
  No return Value.

void setAngularVelocity | ( | float | velocity | ) |

Sets Objects Angular Velocity.

Parameters

  velocity | The speed at which the object will rotate.

Returns
  No return Value.

void setArea | ( | float | x1,
|  | float | y1,
|  | float | x2,
|  | float | y2
| ) |  |

Sets the objects area.

Parameters

  x1 | The lower left corner x position.
  y1 | The lower left corner y position.
  x2 | The upper right corner x position.
  y2 | The upper right corner y position.

Returns
  No return value.

void setAwake | ( |  | ) |

Sets whether the body is awake or not.

Parameters

  status | - Whether the body should be awake or not (defaults to true).

Returns
  No return Value.

void setBlendAlpha | ( | float | alpha | ) |

Sets the Rendering Alpha (transparency). The alpha value specifies directly the transparency of the image. A value of 1.0 will not affect the object and a value of 0.0 will make the object completely transparent.

Parameters

  alpha | The alpha value.

Returns
  No return Value.

void setBlendColor | ( | float | red,
|  | float | green,
|  | float | blue
| ) |  |

or ( stockColorName ) - Sets the blend color.

Parameters

  red | The red value.
  green | The green value.
  blue | The blue value.
  alpha | The alpha value.

Returns
  No return Value.

void setBlendMode | ( | bool | blendMode | ) |

Sets whether blending is on or not. Whether blending is on or not.

Returns
  No return Value.

void setBodyType | ( | bodyType | type | ) |

Sets the body type.

Returns
  No return value.

void setBullet | ( |  | ) |

Sets whether the body is a bullet or not.

Parameters

  status | - Whether the body should be a bullet (fast moving body) or not (defaults to true).

Returns
  No return Value.

void setCollisionAgainst | ( | SceneObject | object | ) |

Sets the collision masks against a specific object.

Parameters

  object | The SceneObject to set collision masks against
  clearMasks | Whether or not to clear the collision masks before setting them against the object.

Returns
  No return value.

void setCollisionCallback | ( |  | ) |

Sets whether the 'Scene::onCollision' callback is called or not. Sets whether whether the 'Scene::onCollision' callback is called or not.

Parameters

  status | Whether the 'Scene::onCollision' callback is called or not (default is false).

Returns
  No return Value.

void setCollisionGroups | ( | groups |  | ) |

Sets the collision group(s).

Parameters

  groups | A list of collision groups to collide with.

Returns
  No return value.

void setCollisionLayers | ( | layers |  | ) |

Sets the collision layers(s).

Parameters

  layers | A list of layers to collide with.

Returns
  No return value.

void setCollisionMasks | ( | groupMask |  | ) |

Sets the collision masks. Collision masks limit the objects that are collided with based on their scene group and scene Layer. In order for two objects to collide, the sending object must have the receiving object's Graph Group and Rendering Layer in its masks. The receiving object's masks, however, do not have to contain the sending object's Graph Group and Rendering Layer.

Parameters

  sceneGroupMask | The scene group(s) to enable collision with.
  sceneLayerMask | The scene layer(s) to enable collision with. If sceneLayerMask is not specified then all scene layers will be included.

Returns
  No return value.

void setCollisionOneWay | ( |  | ) |

Sets the one way collision status for chain and edge shapes that belong to this object.

Parameters

  status | Whether collisions happen only in one direction or not (defaults to false).

Returns
  No return value.

void setCollisionShapeDensity | ( | int | shapeIndex,
|  | float | density
| ) |  |

Sets the density of the collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.
  density | - The collision shape density.

Returns
  No return value.

void setCollisionShapeFriction | ( | int | shapeIndex,
|  | float | friction
| ) |  |

Sets the friction of the collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.
  friction | - The collision shape friction.

Returns
  No return value.

void setCollisionShapeIsSensor | ( | int | shapeIndex,
|  | bool | status
| ) |  |

Sets whether the collision shape at the specified index is a sensor or not.

Parameters

  shapeIndex | - The index of the collision shape.
  status | - Whether the collision shape at the specified index is a sensor or not.

Returns
  No return value.

void setCollisionShapeRestitution | ( | int | shapeIndex,
|  | float | restitution
| ) |  |

Sets the restitution of the collision shape at the specified index.

Parameters

  shapeIndex | - The index of the collision shape.
  density | - The collision shape restitution.

Returns
  No return value.

void setCollisionSuppress | ( |  | ) |

Sets the collision suppress status.

Parameters

  status | Whether to suppress the collision or not (defaults to true).

Returns
  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 setDefaultDensity | ( | float | density | ) |

Sets the default density to use when creating collision shapes.

Parameters

  density | The default density to use when creating collision shapes.
  updateShapes | Whether to update the density on any existing shapes or not (default is true).

Returns
  No return Value.

void setDefaultFriction | ( | float | friction | ) |

Sets the default friction to use when creating collision shapes.

Parameters

  friction | The default friction to use when creating collision shapes.
  updateShapes | Whether to update the friction on any existing shapes or not (default is true).

Returns
  No return Value.

void setDefaultRestitution | ( | float | restitution | ) |

Sets the default restitution to use when creating collision shapes..

Parameters

  restitution | The default restitution to use when creating collision shapes.
  updateShapes | Whether to update the restitution on any existing shapes or not (default is true).

Returns
  No return Value.

void setDstBlendFactor | ( | dstBlend |  | ) |

Sets the destination blend factor.

Parameters

  dstBlend | The destination blend factor.

Returns
  No return Value.

void setEnabled | ( | bool | status | ) |

Enables or disables the object.

Parameters

  status | Whether to enable or disable the object.

Returns
  No return value.

void setFixedAngle | ( | bool status? |  | ) |

Whether the object angle is fixed or not.

Returns
  No return Value.

void setGatherContacts | ( | bool | gatherContacts | ) |

Sets whether to gather contacts or not.

Parameters

  gatherContacts | Whether to gather contacts or not. By default contact gather is off as it can become expensive if a lot of contacts are being processed.

Returns
  No return value.

void setGravityScale | ( | float | scale | ) |

Sets the scaled world gravity.

Parameters

  scale | - The scaled world gravity.

Returns
  No return Value.

void setHeight | ( | float | height | ) |

Sets the height of the object.

Parameters

  height | The height of the object.

Returns
  No return value.

void setLifetime | ( | float | lifetime | ) |

Set Objects' Lifetime.

Parameters

  lifetime | The amount of time, in seconds, before the object is automatically deleted.

Returns
  No return Value.

void setLinearDamping | ( | float | damping | ) |

Sets the linear damping.

Parameters

  damping | - The linear damping scale.

Returns
  No return Value.

void setLinearVelocity | ( | float | velocityX,
|  | float | velocityY
| ) |  |

Sets Objects Linear Velocity. Sets the velocity at which the object will move.

Parameters

  velocityX | The x component of the velocity.
  velocityY | The y component of the velocity.

Returns
  No return Value.

void setLinearVelocityPolar | ( | float | angle,
|  | float | speed
| ) |  |

Sets Objects Linear Velocity using Polar-speed. Sets the speed and direction at which the object will move. This has the same effect as setLinearVelocity(), it just sets the velocity in a different way.

Parameters

  angle | The angle of the direction at which the object to move.
  speed | The speed at which the object will move.

Returns
  No return Value.

void setLinearVelocityX | ( | float | velocityX | ) |

Sets Objects Linear Velocity X-Component.

Parameters

  velocityX | The x component of the velocity.

Returns
  No return Value.

void setLinearVelocityY | ( | float | velocityY | ) |

Sets Objects Linear Velocity Y-Component.

Parameters

  velocityY | The y component of the velocity.

Returns
  No return Value.

void setPickingAllowed | ( | bool | pickingAllowed | ) |

Sets whether picking is allowed or not.

Parameters

  pickingAllowed | Whether picking is allowed or not.

Returns
  No return Value.

void setPosition | ( | float | x,
|  | float | y
| ) |  |

Sets the objects position.

Parameters

  x | The position of the object along the horizontal axis.
  y | The position of the object along the vertical axis.

Returns
  No return value.

void setPositionX | ( | float | x | ) |

Sets the objects x position.

Parameters

  x | The horizontal position of the object.

Returns
  No return value.

void setPositionY | ( | float | y | ) |

Sets the objects y position.

Parameters

  y | The vertical position of the object.

Returns
  No return value.

void setRenderGroup | ( | renderGroup |  | ) |

Sets the name of the render group used to sort the object during rendering.

Parameters

  renderGroup | The name of the render group to use. Defaults to nothing.

Returns
  No return value.

void setSceneGroup | ( | integer | group | ) |

Sets the objects group (0-31). The scene group to place the object in.

Parameters

  group | Integer in the range [0-31].

Returns
  No return Value.

void setSceneLayer | ( | integer | layer | ) |

Sets the objects scene layer (0-31). The layer on which to place the object.

Parameters

  layer | Integer in the range [0-31].

Returns
  No return Value.

void setSceneLayerDepth | ( | float | layerDepth | ) |

Sets the objects scene layer depth.

Parameters

  layerDepth | The layer depth can be any value.

Returns
  No return Value.

Boolean setSceneLayerDepthBack | ( |  | ) |

Sets the layer depth to be the back-most within the current layer..

Returns
  Whether the scene layer depth was adjusted or not.

Boolean setSceneLayerDepthBackward | ( |  | ) |

Sets the layer depth to be behind of the object currently behind within the current layer.

Returns
  Whether the scene layer depth was adjusted or not.

Boolean setSceneLayerDepthForward | ( |  | ) |

Sets the layer depth to be in-front of the object currently in-front within the current layer.

Returns
  Whether the scene layer depth was adjusted or not.

Boolean setSceneLayerDepthFront | ( |  | ) |

Sets the layer depth to be the front-most within the current layer..

Returns
  Whether the scene layer depth was adjusted or not.

void setSize | ( | float | width,
|  | float | height
| ) |  |

Sets the objects size.

Parameters

  width | The width of the object.
  height | The height of the object.

Returns
  No return value.

void setSizeX | ( | float | width | ) |

Sets the width of the object.

Parameters

  width | The width of the object.

Returns
  No return value.

void setSizeY | ( | float | height | ) |

Sets the height of the object.

Parameters

  height | The height of the object.

Returns
  No return value.

void setSleepingAllowed | ( |  | ) |

Sets whether the body is allowed to sleep or not.

Parameters

  status | - Whether sleeping is allowed on the body or not (defaults to true).

Returns
  No return Value.

void setSleepingCallback | ( |  | ) |

Sets whether the 'onWake' and 'onSleep' callbacks are called or not when the object changes sleep state. The object must be able to sleep (setSleepingAllowed) and have a 'dynamic' body mode for this callback to occur.

Parameters

  status | Whether the 'onWake' and 'onSleep' callbacks are called or not (default is false).

Returns
  No return Value.

void setSortPoint | ( | float | x,
|  | float | y
| ) |  |

Sets the layer draw order sorting point.

Parameters

  x | The x position local to the object of the sort point.
  y | The y position local to the object of the sort point.

Returns
  No return value.

void setSortPointX | ( | float | x | ) |

Sets the x-component of the layer draw order sorting point.

Parameters

  x | The x position local to the object of the sort point.

Returns
  No return value.

void setSortPointY | ( | float | y | ) |

Sets the y-component of the layer draw order sorting point.

Parameters

  y | The y position local to the object of the sort point.

Returns
  No return value.

void setSrcBlendFactor | ( | srcBlend |  | ) |

Sets the source blend factor.

Parameters

  srcBlend | The source blend factor.

Returns
  No return Value.

void setUpdateCallback | ( |  | ) |

Sets whether the 'onUpdate' callback is called or not.

Parameters

  status | Whether the 'onUpdate' callback is called or not (default is false).

Returns
  No return Value.

void setUseInputEvents | ( | bool | inputStatus | ) |

Sets whether input events are passed from the scene window are monitored by this object or not.

Parameters

  inputStatus | Whether input events are passed from the scene window are monitored by this object or not.

Returns
  No return Value.

void setVisible | ( | bool | status | ) |

Show or hide the object.

Parameters

  status | Whether to enable or disable visibility on the object.

Returns
  No return value.

void setWidth | ( | float | width | ) |

Sets the width of the object.

Parameters

  width | The width of the object.

Returns
  No return value.