loading...
Join the ludiloom Public Alpha Test and help us change the game-making game...
Ludiloom API
last updated on 2009, May 22nd
| Base Concepts | Scene Objects | Data Interface | Gui Overlays | |||
|
Arena Object ObjectTemplate Presence PresenceTemplate RuleBook System |
BillBoard Camera Effect HighlightDecal Light Material MeshDecal |
Model Plane River Road Sound StaticFlora Terrain |
HashTable InterModel Matrix MediaItem Vector |
Button Checkbox CodeEditbox ComboBox Editbox Listbox MenuBar MenuItem |
MenuPopup MultiColumn MultilineEditbox ProgressBar RadioButton ScrollBar ScrollPane SliderBar |
Spinner StaticImage StaticText TabPane ToggleButton Tree Window |
Model
print
nil print ()
Model is a type of representation that represents a 3D Model or Mesh.
If you can't find a model that suits you in the package explorer and want to make one yourself remember that we are using OGRE Meshes as 3D models. The good news is that you have plugins for most of 3D modeling software to export your 3D models as OGRE meshes.
Visite OGRE's tools webpage at http://www.ogre3d.org/index.php?option=com_content&task=view&id=413&Itemid=133
| Method Summary | |
nil | addRepresentation (representation toAdd) |
nil | addShapeBox (string name) |
nil | addShapeBox (string name, string material) |
nil | addShapeBox (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz) |
nil | addShapeBox (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz) |
nil | addShapeCapsule (string name) |
nil | addShapeCapsule (string name, string material) |
nil | addShapeCapsule (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height) |
nil | addShapeSensorBox (string name) |
nil | addShapeSensorCapsule (string name) |
nil | addShapeSensorCapsule (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height) |
nil | addShapeSensorSphere (string name) |
nil | addShapeSphere (string name) |
nil | addShapeSphere (string name, string material) |
nil | addShapeSphere (string name, string material, number x, number y, number z, number radius) |
nil | addShapeSphere (string name, number x, number y, number z, number radius) |
nil | addShapeTriangleMesh (string name) |
nil | addShapeTriangleMesh (string name, string material) |
nil | applyForce (number forcex, number forcey, number forcez, int forceType) |
nil | applyForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType) |
nil | applyForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType) |
nil | applyLocalForce (number forcex, number forcey, number forcez, int forceType) |
nil | applyLocalForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType) |
nil | applyLocalForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType) |
nil | applyLocalTorque (number forcex, number forcey, number forcez, int forceType) |
nil | applyTorque (number forcex, number forcey, number forcez, int forceType) |
nil | attachModelToBone (Representation otherModel, string bone) |
nil | controlVehicle (float acceleration, float leftTurn, float rightTurn, float brake, float handbrake) |
nil | detachModel (Representation detach) |
Object, string, InterModel | getAIMovementOnStartListener () |
Object, string, InterModel | getAIMovementOnStopListener () |
array{} | getAllShapeNames () |
array{} | getAnimationMask (string animation) |
number | getCharacterHeight () |
number | getCharacterJumpHeight () |
number | getCharacterMaxSlope () |
number, number, number | getCharacterOffset () |
number | getCharacterRadius () |
number | getCharacterRotation () |
number, number, number, number | getCharacterSpeed () |
number | getCharacterSpeedBack () |
number | getCharacterSpeedFront () |
number | getCharacterSpeedRotate () |
number | getCharacterSpeedStrafe () |
number | getCharacterStepHeight () |
string | getID () |
string | getMaterial (number submesh) |
array{} | getMaterials () |
MediaItem | getMediaItem () |
Object, string, InterModel, boolean, string | getMouseButtonClickedListener (number mousekey) |
Object, string, InterModel, boolean, string | getMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseButtonDoubleClickedListener (number mousekey) |
Object, string, InterModel, boolean, string | getMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseButtonPressedListener (number mousekey) |
Object, string, InterModel, boolean, string | getMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseButtonReleasedListener (number mousekey) |
Object, string, InterModel, boolean, string | getMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseButtonTripleClickedListener (number mousekey) |
Object, string, InterModel, boolean, string | getMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseEnteredListener () |
Object, string, InterModel, boolean, string | getMouseEnteredListener (boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseLeftListener () |
Object, string, InterModel, boolean, string | getMouseLeftListener (boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseMovedListener () |
Object, string, InterModel, boolean, string | getMouseMovedListener (boolean ctrl, boolean alt, boolean shift) |
Object, string, InterModel, boolean, string | getMouseWheelMovedListener (number mousekey) |
Object, string, InterModel, boolean, string | getMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
string | getName () |
number | getPhysicsMass () |
number | getPhysicsSync () |
number | getPhysicsType () |
number, number, number | getPosition () |
number, number, number, number | getQuaternion () |
Object, string, InterModel | getRayHitListener () |
representation | getRepresentation (string name, number type) |
representation | getRepresentationContainer () |
array{} | getRepresentations () |
number, number, number | getRotation () |
number, number, number | getScale () |
number | getShapeHeight (string name) |
number, number, number, number | getShapeOrientation (string name) |
string | getShapePhysicsMaterial (string name) |
number, number, number | getShapePosition (string name) |
number | getShapeRadius (string name) |
number, number, number | getShapeScale (string name) |
number | getShapeType (string name) |
number | getType () |
nil | goTo (float positionX, float positionY, float positionZ) |
nil | goTo (float positionX, float positionY, float positionZ, float speed, float turnSpeed) |
boolean | hasAIMovementOnStartListener () |
boolean | hasAIMovementOnStopListener () |
boolean | hasMouseButtonClickedListener (number mousekey) |
boolean | hasMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseButtonDoubleClickedListener (number mousekey) |
boolean | hasMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseButtonPressedListener (number mousekey) |
boolean | hasMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseButtonReleasedListener (number mousekey) |
boolean | hasMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseButtonTripleClickedListener (number mousekey) |
boolean | hasMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseEnteredListener () |
boolean | hasMouseEnteredListener (boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseLeftListener () |
boolean | hasMouseLeftListener (boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseMovedListener () |
boolean | hasMouseMovedListener (boolean ctrl, boolean alt, boolean shift) |
boolean | hasMouseWheelMovedListener (number mousekey) |
boolean | hasMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
boolean | hasRayHitListener () |
boolean | hasRepresentation (representation other) |
boolean | hasRepresentation (string name, number type) |
boolean | hasShape (string name) |
boolean | isCastShadowsEnabled () |
boolean | isCharacterCollisionEnabled () |
boolean | isCharacterGravityEnabled () |
boolean | isPersistent () |
boolean | isVisible () |
nil | jump () |
nil | jump (float height) |
nil | pauseAnimation (string anima) |
nil | playAnimation (string anima, number freq, boolean loop) |
nil | playAnimation (string anima, number frame) |
nil | playSurfaceTranslation (number freq, boolean loop, array{} positions) |
nil | playTranslation (number freq, boolean loop, array{} positions) |
nil | print () |
nil | removeAIMovementOnStartListener () |
nil | removeAIMovementOnStopListener () |
nil | removeAllRepresentations () |
nil | removeAllShapes () |
nil | removeMouseButtonClickedListener (number mousekey) |
nil | removeMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseButtonDoubleClickedListener (number mousekey) |
nil | removeMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseButtonPressedListener (number mousekey) |
nil | removeMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseButtonReleasedListener (number mousekey) |
nil | removeMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseButtonTripleClickedListener (number mousekey) |
nil | removeMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseEnteredListener () |
nil | removeMouseEnteredListener (boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseLeftListener () |
nil | removeMouseLeftListener (boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseMovedListener () |
nil | removeMouseMovedListener (boolean ctrl, boolean alt, boolean shift) |
nil | removeMouseWheelMovedListener (number mousekey) |
nil | removeMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift) |
nil | removePhysics () |
nil | removeRepresentation (representation other) |
nil | removeRepresentation (string name, number type) |
nil | removeShape (string name) |
nil | rotateAroundVector (number angle, number x, number y, number z) |
nil | rotatePitch (number angle) |
nil | rotateRoll (number angle) |
nil | rotateYaw (number angle) |
nil | setAIMovementOnStartListener (Object target, string name, InterModel interactionModel, boolean global, string channel) |
nil | setAIMovementOnStopListener (Object target, string name, InterModel interactionModel) |
nil | setAIMovementOnStopListener (Object target, string name, InterModel interactionModel, boolean global, string channel) |
nil | setAnimationMask (string animation, array{} n}) |
nil | setCastShadowsEnabled (boolean shadows) |
nil | setCharacterCollisionEnabled (boolean collision) |
nil | setCharacterGravityEnabled (boolean collision) |
nil | setCharacterHeight (number height) |
nil | setCharacterJumpHeight (number maxSlope) |
nil | setCharacterJumpHeight (number jumpHeight) |
nil | setCharacterOffset (number offsetX, number offsetY, number offsetZ) |
nil | setCharacterRadius (number radius) |
nil | setCharacterRotation (number rotation) |
nil | setCharacterSpeed (number speedFront, number speedBack, number speedStrafe, number speedRotate) |
nil | setCharacterSpeedBack (number speedBack) |
nil | setCharacterSpeedFront (number speedFront) |
nil | setCharacterSpeedStrafe (number speedStrafe) |
nil | setCharacterStepHeight (number stepHeight) |
nil | setMaterial (string material) |
nil | setMaterial (string material, number submesh) |
nil | setMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel) |
nil | setMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel) |
nil | setMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel) |
nil | setMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel) |
nil | setMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseEnteredListener (Object target, string name, InterModel interactionModel) |
nil | setMouseEnteredListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseLeftListener (Object target, string name, InterModel interactionModel) |
nil | setMouseLeftListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseMovedListener (Object target, string name, InterModel interactionModel) |
nil | setMouseMovedListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel) |
nil | setMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel) |
nil | setPersistent (boolean persistent) |
nil | setPhysicsCharacter () |
nil | setPhysicsCharacter (number syncType) |
nil | setPhysicsCharacter (number syncType, number mass) |
nil | setPhysicsDynamic () |
nil | setPhysicsDynamic (number syncType) |
nil | setPhysicsDynamic (number syncType, number mass) |
nil | setPhysicsMass (number mass) |
nil | setPhysicsStatic () |
nil | setPhysicsSync (number syncType) |
nil | setPosition (number x, number y, number z) |
nil | setQuaternion (number w, number x, number y, number z) |
nil | setRayHitListener (Object target, string name, InterModel interactionModel) |
nil | setRayHitListener (Object target, string name, InterModel interactionModel, boolean global, string channel) |
nil | setRotation (number x, number y, number z) |
nil | setScale (number x, number y, number z) |
nil | setShapeHeight (string name, number height) |
nil | setShapeOrientation (string name, number ow, number ox, number oy, number oz) |
nil | setShapePhysicsMaterial (string name, string physicsMaterial) |
nil | setShapePosition (string name, number x, number y, number z) |
nil | setShapeRadius (string name, number radius) |
nil | setShapeScale (string name, number sx, number sy, number sz) |
nil | setSurfacePosition (number x, number y, number z) |
nil | setSurfacePosition (number x, number z) |
nil | setSurfacePosition (number x, number y, number z) |
nil | setVehicleGear (unsigned int) |
nil | setVisible (boolean visible) |
nil | startMovementBackward () |
nil | startMovementBackward (float speed) |
nil | startMovementForward () |
nil | startMovementForward (float speed) |
nil | startMovementRotateLeft () |
nil | startMovementRotateLeft (float speed) |
nil | startMovementRotateRight () |
nil | startMovementRotateRight (float speed) |
nil | startMovementStrafeLeft () |
nil | startMovementStrafeLeft (float speed) |
nil | startMovementStrafeRight () |
nil | startMovementStrafeRight (float speed) |
nil | stop () |
nil | stopAnimation (string anima) |
nil | stopMovementBackward () |
nil | stopMovementForward () |
nil | stopMovementRotateLeft () |
nil | stopMovementRotateRight () |
nil | stopMovementStrafeLeft () |
nil | stopMovementStrafeRight () |
nil | stopTranslation () |
nil | turnTo (float angle) |
nil | turnTo (float angle, float turnSpeed) |
| Method Detail |
addRepresentation
nil addRepresentation (representation toAdd)- Adds another representation to this representation.
- Parameters:
representation toAdd- Representation to be added to this representation.
addShapeBox
nil addShapeBox (string name)- Adds a shape to the model with the specified name. Physics material, relative position, relative orientation and scale will be set to the default values.
- Parameters:
string name- Name of the shape.
addShapeBox
nil addShapeBox (string name, string material)- Adds a shape to the model with the specified name and physics material. Relative position, relative orientation and scale will be set to the default values.
- Parameters:
string name- Name of the shape.string material- Physics material of the box shape.
addShapeBox
nil addShapeBox (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz)- Adds a shape to the model with the specified name, physics material, relative position, relative orientation and scale.
- Parameters:
string name- Name of the shape.string material- Physics material of the box shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.number dw- W angle for the relative orientation.number dx- X coordinate for the relative orientation.number dy- Y coordinate for the relative orientation.number dz- Z coordinate for the relative orientation.number sx- X coordinate for the scale.number sy- Y coordinate for the scale.number sz- Z coordinate for the scale.
addShapeBox
nil addShapeBox (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz)- Adds a sensor shape to the model with the specified name, physics material, relative position, relative orientation and scale.
- Parameters:
string name- Name of the shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.number dw- W angle for the relative orientation.number dx- X coordinate for the relative orientation.number dy- Y coordinate for the relative orientation.number dz- Z coordinate for the relative orientation.number sx- X coordinate for the scale.number sy- Y coordinate for the scale.number sz- Z coordinate for the scale.
addShapeCapsule
nil addShapeCapsule (string name)- Adds a shape to the model with the specified name. Physics material, relative position, relative orientation, radius and height scaling will be set to the default values.
- Parameters:
string name- Name of the shape.
addShapeCapsule
nil addShapeCapsule (string name, string material)- Adds a shape to the model with the specified name and physics material. Relative position, relative orientation, radius and height scaling will be set to the default values.
- Parameters:
string name- Name of the shape.string material- Physics material of the capsule shape.
addShapeCapsule
nil addShapeCapsule (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height)- Adds a shape to the model with the specified name, physics material, relative position, relative orientation, radius and height.
- Parameters:
string name- Name of the shape.string material- Physics material of the box shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.number dw- W angle for the relative orientation.number dx- X coordinate for the relative orientation.number dy- Y coordinate for the relative orientation.number dz- Z coordinate for the relative orientation.number radius- Radius scaling of the hemispheres of the shape.number height- Distance scaling between the centers of the hemispheres of the shape.
addShapeSensorBox
nil addShapeSensorBox (string name)- Adds a sensor shape to the model with the specified name. relative position, relative orientation and scale will be set to the default values.
- Parameters:
string name- Name of the shape.
addShapeSensorCapsule
nil addShapeSensorCapsule (string name)- Adds a sensor shape to the model with the specified name. relative position, relative orientation, radius and height scaling will be set to the default values.
- Parameters:
string name- Name of the shape.
addShapeSensorCapsule
nil addShapeSensorCapsule (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height)- Adds a sensor shape to the model with the specified name, physics material, relative position, relative orientation, radius and height.
- Parameters:
string name- Name of the shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.number dw- W angle for the relative orientation.number dx- X coordinate for the relative orientation.number dy- Y coordinate for the relative orientation.number dz- Z coordinate for the relative orientation.number radius- Radius scaling of the hemispheres of the shape.number height- Distance scaling between the centers of the hemispheres of the shape.
addShapeSensorSphere
nil addShapeSensorSphere (string name)- Adds a sensor shape to the model with the specified name. relative position and radius scaling will be set to the default values.
- Parameters:
string name- Name of the shape.
addShapeSphere
nil addShapeSphere (string name)- Adds a shape to the model with the specified name. Physics material, relative position and radius scaling will be set to the default values.
- Parameters:
string name- Name of the shape.
addShapeSphere
nil addShapeSphere (string name, string material)- Adds a shape to the model with the specified name and physics material. Relative position and radius scaling will be set to the default values.
- Parameters:
string name- Name of the shape.string material- Physics material of the sphere shape.
addShapeSphere
nil addShapeSphere (string name, string material, number x, number y, number z, number radius)- Adds a shape to the model with the specified name, physics material, relative position and radius.
- Parameters:
string name- Name of the shape.string material- Physics material of the sphere shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.number radius- Radius scaling of the shape.
addShapeSphere
nil addShapeSphere (string name, number x, number y, number z, number radius)- Adds a sensor shape to the model with the specified name, relative position and radius.
- Parameters:
string name- Name of the shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.number radius- Radius scaling of the shape.
addShapeTriangleMesh
nil addShapeTriangleMesh (string name)- Adds a shape to the model with the specified name. The shape will have the exact form of the mesh. The physics material will the set to the default value.
- Parameters:
string name- Name of the shape.
addShapeTriangleMesh
nil addShapeTriangleMesh (string name, string material)- Adds a shape to the model with the specified name and physics material. The shape will have the exact form of the mesh.
- Parameters:
string name- Name of the shape.string material- Physics material of the triangle mesh shape.
applyForce
nil applyForce (number forcex, number forcey, number forcez, int forceType)- Applies a force vector to the body of the object
- Parameters:
number forcex- amount of force to be applied to the object along the X axis.number forcey- amount of force to be applied to the object along the Y axis.number forcez- amount of force to be applied to the object along the Z axis.int forceType- type of force to be applied to the object
applyForceAtLocalPosition
nil applyForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)- Applies a force vector to the body of the object at the given local point
- Parameters:
number forcex- amount of force to be applied to the object along the X axis.number forcey- amount of force to be applied to the object along the Y axis.number forcez- amount of force to be applied to the object along the Z axis.number positionx- X coordinate of the point where the force will be applied.number positiony- Y coordinate of the point where the force will be applied.number positionz- Z coordinate of the point where the force will be applied.int forceType- type of force to be applied to the object
applyForceAtPosition
nil applyForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)- Applies a force vector to the body of the object at the given point
- Parameters:
number forcex- amount of force to be applied to the object along the X axis.number forcey- amount of force to be applied to the object along the Y axis.number forcez- amount of force to be applied to the object along the Z axis.number positionx- X coordinate of the point where the force will be applied.number positiony- Y coordinate of the point where the force will be applied.number positionz- Z coordinate of the point where the force will be applied.int forceType- type of force to be applied to the object
applyLocalForce
nil applyLocalForce (number forcex, number forcey, number forcez, int forceType)- Applies a force vector to the body of the object in it's local axis
- Parameters:
number forcex- amount of force to be applied to the object along the X axis.number forcey- amount of force to be applied to the object along the Y axis.number forcez- amount of force to be applied to the object along the Z axis.int forceType- type of force to be applied to the object
applyLocalForceAtLocalPosition
nil applyLocalForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)- Applies a force vector to the body of the object in it's local axis at the given local point
- Parameters:
number forcex- amount of force to be applied to the object along the X axis.number forcey- amount of force to be applied to the object along the Y axis.number forcez- amount of force to be applied to the object along the Z axis.number positionx- X coordinate of the point where the force will be applied.number positiony- Y coordinate of the point where the force will be applied.number positionz- Z coordinate of the point where the force will be applied.int forceType- type of force to be applied to the object
applyLocalForceAtPosition
nil applyLocalForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)- Applies a force vector to the body of the object in it's local axis at the given point
- Parameters:
number forcex- amount of force to be applied to the object along the X axis.number forcey- amount of force to be applied to the object along the Y axis.number forcez- amount of force to be applied to the object along the Z axis.number positionx- X coordinate of the point where the force will be applied.number positiony- Y coordinate of the point where the force will be applied.number positionz- Z coordinate of the point where the force will be applied.int forceType- type of force to be applied to the object
applyLocalTorque
nil applyLocalTorque (number forcex, number forcey, number forcez, int forceType)- Applies a torque force vector to the body of the object in it's local axis
- Parameters:
number forcex- amount of torque to be applied to the object along the X axis.number forcey- amount of torque to be applied to the object along the Y axis.number forcez- amount of torque to be applied to the object along the Z axis.int forceType- type of torque to be applied to the object
applyTorque
nil applyTorque (number forcex, number forcey, number forcez, int forceType)- Applies a torque force vector to the body of the object in it's local axis
- Parameters:
number forcex- amount of torque to be applied to the object along the X axis.number forcey- amount of torque to be applied to the object along the Y axis.number forcez- amount of torque to be applied to the object along the Z axis.int forceType- type of torque to be applied to the object
attachModelToBone
nil attachModelToBone (Representation otherModel, string bone)- Attaches another model to a bone of this model.
- Parameters:
Representation otherModel- The model that will be attached to the bone.string bone- Name of the bone to attach the model to.
controlVehicle
nil controlVehicle (float acceleration, float leftTurn, float rightTurn, float brake, float handbrake)- Moves a vehicle.
- Parameters:
float acceleration- Amount of acceleration to apply on the vehiclefloat leftTurn- Amount of left turning to apply on the vehicle.float rightTurn- Amount of left turning to apply on the vehicle.float brake- Amount of brake to apply on the vehicle.float handbrake- Amount of handbrake to apply on the vehicle.
detachModel
nil detachModel (Representation detach)- Detaches a model from this model.
- Parameters:
Representation detach- The model that will be detached from this model.
getAIMovementOnStartListener
Object, string, InterModel getAIMovementOnStartListener ()- Returns the listener information of the 'pathfind started' event of the model.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.
getAIMovementOnStopListener
Object, string, InterModel getAIMovementOnStopListener ()- Returns the listener information of the 'pathfind stopped' event of the model.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.
getAllShapeNames
array{} getAllShapeNames ()- Returns an array containing the shape names of the model.
- Returns:
array{}- Array containing the shape names of the model.
getAnimationMask
array{} getAnimationMask (string animation)- Returns the bone weights from a given animation
- Parameters:
string animation- name.
- Returns:
array{}- n} weights (between 0 and 1) for the n bones of the model.
getCharacterHeight
number getCharacterHeight ()- Gets the height of the Model character shape
- Returns:
number- Height of the Model character shape
getCharacterJumpHeight
number getCharacterJumpHeight ()- Gets the jump height of the Model character
- Returns:
number- Jump height of the Model character
getCharacterMaxSlope
number getCharacterMaxSlope ()- Gets the maximum slope that the Model character can climb
- Returns:
number- Maximum slope that the Model character can climb
getCharacterOffset
number, number, number getCharacterOffset ()- Gets the Model character shape position offset
- Returns:
number- Offset X coordinate.number- Offset Y coordinate.number- Offset Z coordinate.
getCharacterRadius
number getCharacterRadius ()- Gets the radius of the Model character shape
- Returns:
number- Radius of the Model character shape
getCharacterRotation
number getCharacterRotation ()- Gets the rotation of the Model character shape
- Returns:
number- Rotation of the Model character shape
getCharacterSpeed
number, number, number, number getCharacterSpeed ()- Gets the movement speed of the Model character
- Returns:
number- Forward movement speed of the Model characternumber- Backward movement speed of the Model characternumber- Strafe movement speed of the Model characternumber- Rotate movement speed of the Model character
getCharacterSpeedBack
number getCharacterSpeedBack ()- Gets the backward movement speed of the Model character
- Returns:
number- Bacward movement speed of the Model character
getCharacterSpeedFront
number getCharacterSpeedFront ()- Gets the forward movement speed of the Model character
- Returns:
number- Forward movement speed of the Model character
getCharacterSpeedRotate
number getCharacterSpeedRotate ()- Gets the rotate movement speed of the Model character
- Returns:
number- Rotate movement speed of the Model character
getCharacterSpeedStrafe
number getCharacterSpeedStrafe ()- Gets the strafe movement speed of the Model character
- Returns:
number- Strafe movement speed of the Model character
getCharacterStepHeight
number getCharacterStepHeight ()- Gets the step height of the Model character
- Returns:
number- Step height of the Model character
getID
string getID ()- Returns the representation ID.
- Returns:
string- Representation ID.
getMaterial
string getMaterial (number submesh)- Returns the Material name applied to a given sub-mesh.
- Parameters:
number submesh- The number of the sub-mesh.
- Returns:
string- The Material name applied to the sub-mesh.
getMaterials
array{} getMaterials ()- Returns the Material names applied to each sub-mesh.
- Returns:
array{}- An array containing tupples of sub-mesh numbers and the Material name applied to each sub-mesh.
getMediaItem
MediaItem getMediaItem ()- Returns the Media Item corresponding to the Model.
- Returns:
MediaItem- The Media Item corresponding to the Model.
getMouseButtonClickedListener
Object, string, InterModel, boolean, string getMouseButtonClickedListener (number mousekey)- Returns the 'mouse button clicked' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonClickedListener
Object, string, InterModel, boolean, string getMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse button clicked' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonDoubleClickedListener
Object, string, InterModel, boolean, string getMouseButtonDoubleClickedListener (number mousekey)- Returns the 'mouse button double clicked' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonDoubleClickedListener
Object, string, InterModel, boolean, string getMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse button double clicked' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonPressedListener
Object, string, InterModel, boolean, string getMouseButtonPressedListener (number mousekey)- Returns the 'mouse button pressed' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonPressedListener
Object, string, InterModel, boolean, string getMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse button pressed' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonReleasedListener
Object, string, InterModel, boolean, string getMouseButtonReleasedListener (number mousekey)- Returns the 'mouse button released' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonReleasedListener
Object, string, InterModel, boolean, string getMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse button released' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonTripleClickedListener
Object, string, InterModel, boolean, string getMouseButtonTripleClickedListener (number mousekey)- Returns the 'mouse button triple clicked' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseButtonTripleClickedListener
Object, string, InterModel, boolean, string getMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse button triple clicked' listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseEnteredListener
Object, string, InterModel, boolean, string getMouseEnteredListener ()- Returns the 'mouse entered' listener of the Model.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseEnteredListener
Object, string, InterModel, boolean, string getMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse entered' listener of the Model.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseLeftListener
Object, string, InterModel, boolean, string getMouseLeftListener ()- Returns the 'mouse left' listener of the Model.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseLeftListener
Object, string, InterModel, boolean, string getMouseLeftListener (boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse left' listener of the Model.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseMovedListener
Object, string, InterModel, boolean, string getMouseMovedListener ()- Returns the 'mouse moved' listener of the Model.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseMovedListener
Object, string, InterModel, boolean, string getMouseMovedListener (boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse moved' listener of the Model.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseWheelMovedListener
Object, string, InterModel, boolean, string getMouseWheelMovedListener (number mousekey)- Returns the 'mouse wheel moved' listener of the Model.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getMouseWheelMovedListener
Object, string, InterModel, boolean, string getMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns the 'mouse wheel moved' listener of the Model.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.boolean- 'True' if this listener is executed globally, 'false' if it is executed only locally.string- The channel of the listener.
getName
string getName ()- Returns the name of the Model
- Returns:
string- The name of the Model
getPhysicsMass
number getPhysicsMass ()- Returns the mass of the physics object currently applied to the Model.
- Returns:
number- Mass of the object.
getPhysicsSync
number getPhysicsSync ()- Returns the synchronization type of the physics object currently applied to the Model.
- Returns:
number- Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.
getPhysicsType
number getPhysicsType ()- Returns the type of physics currently applied to the Model.
- Returns:
number- The type of physics currently applied to the Model: 'PT_PHYSICS_NONE', 'PT_PHYSICS_STATIC', 'PT_PHYSICS_AUTO', 'PT_PHYSICS_HUMANOID' or 'PT_PHYSICS_DYNAMIC'.
getPosition
number, number, number getPosition ()- Returns the position of the Model.
- Returns:
number- The position of the Model in the X coordinate.number- The position of the Model in the Y coordinate.number- The position of the Model in the Z coordinate.
getQuaternion
number, number, number, number getQuaternion ()- Returns the rotation of the Model in quaternion coordinates.
- Returns:
number- The rotation of the Model in the w coordinate.number- The rotation of the Model in the X coordinate.number- The rotation of the Model in the Y coordinate.number- The rotation of the Model in the Z coordinate.
getRayHitListener
Object, string, InterModel getRayHitListener ()- Returns the listener information of the 'ray hit' event of the model.
- Returns:
Object- The object that contains the interaction that will be executed.string- Name of the interaction.InterModel- Arguments of the interaction that will be executed when this listener is activated.
getRepresentation
representation getRepresentation (string name, number type)- Returns the contained representation with the specified name and type.
- Parameters:
string name- The name of the contained representation.number type- The type of the contained representation.
- Returns:
representation- The contained representation with the specified name and type.
getRepresentationContainer
representation getRepresentationContainer ()- Returns the representation that contains this representation.
- Returns:
representation- The representation that contains this representation.
getRepresentations
array{} getRepresentations ()- Returns an array of the contained representations.
- Returns:
array{}- Array of the contained representations.
getRotation
number, number, number getRotation ()- Returns the rotation of the Model
- Returns:
number- The rotation of the Model in the X coordinate.number- The rotation of the Model in the Y coordinate.number- The rotation of the Model in the Z coordinate.
getScale
number, number, number getScale ()- Returns the scale of the Model.
- Returns:
number- The scale ratio of the Model in the X coordinate.number- The scale ratio of the Model in the Y coordinate.number- The scale ratio of the Model in the Z coordinate.
getShapeHeight
number getShapeHeight (string name)- Gets the height of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
number- height Height of the shape.
getShapeOrientation
number, number, number, number getShapeOrientation (string name)- Gets the orientation of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
number- ow W angle of the shape orientation.number- ox X axis of the shape orientation.number- oy Y axis of the shape orientation.number- oz Z axis of the shape orientation.
getShapePhysicsMaterial
string getShapePhysicsMaterial (string name)- Gets the physics material of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
string- physicsMaterial Physics material of the shape.
getShapePosition
number, number, number getShapePosition (string name)- Gets the relative position of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
number- x X coordinate for the relative position.number- y Y coordinate for the relative position.number- z Z coordinate for the relative position.
getShapeRadius
number getShapeRadius (string name)- Gets the radius of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
number- radius Radius of the shape.
getShapeScale
number, number, number getShapeScale (string name)- Gets the scale of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
number- sx X coordinate for the scale.number- sy Y coordinate for the scale.number- sz Z coordinate for the scale.
getShapeType
number getShapeType (string name)- Returns the type of the shape.
- Parameters:
string name- Name of the shape.
- Returns:
number- Type of the shape: ST_BOX, ST_SPHERE, ST_CAPSULE or ST_TRIANGLE_MESH.
getType
number getType ()- Returns the representation type:
2 - MODEL,
3 - LIGHT,
4 - EFFECT,
5 - PLANE,
6 - WATER,
7 - SOUND,
8 - TERRAIN_MESH_DECAL,
9 - TERRAIN_HIGHLIGHTING_DECAL,
10 - BILLBOARD,
11 - OVERLAY - Returns:
number- The type of the representation.
goTo
nil goTo (float positionX, float positionY, float positionZ)- Starts character AI movement towards the specified position.
- Parameters:
float positionX- Position to which the character will walk towardsfloat positionY- Position to which the character will walk towardsfloat positionZ- Position to which the character will walk towards
goTo
nil goTo (float positionX, float positionY, float positionZ, float speed, float turnSpeed)- Starts character AI movement towards the specified position.
- Parameters:
float positionX- Position to which the character will walk towardsfloat positionY- Position to which the character will walk towardsfloat positionZ- Position to which the character will walk towardsfloat speed- The speed at which the Model will move.float turnSpeed- The speed at which the Model will turn.
hasAIMovementOnStartListener
boolean hasAIMovementOnStartListener ()- Returns 'true' if the model has a 'pathfind started' Listener, otherwise 'false'.
- Returns:
boolean- 'True' if the model has a 'pathfind started' Listener, otherwise 'false'.
hasAIMovementOnStopListener
boolean hasAIMovementOnStopListener ()- Returns 'true' if the model has a 'pathfind stopped' Listener, otherwise 'false'.
- Returns:
boolean- 'True' if the model has a 'pathfind stopped' Listener, otherwise 'false'.
hasMouseButtonClickedListener
boolean hasMouseButtonClickedListener (number mousekey)- Returns 'true' if the Model has a listener for the 'button clicked' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
boolean- 'True' if the Model has a listener for the 'button clicked' event, otherwise 'false'.
hasMouseButtonClickedListener
boolean hasMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'button clicked' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'button clicked' event, otherwise 'false'.
hasMouseButtonDoubleClickedListener
boolean hasMouseButtonDoubleClickedListener (number mousekey)- Returns 'true' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
boolean- 'True' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.
hasMouseButtonDoubleClickedListener
boolean hasMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.
hasMouseButtonPressedListener
boolean hasMouseButtonPressedListener (number mousekey)- Returns 'true' if the Model has a listener for the 'button pressed' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
boolean- 'True' if the Model has a listener for the 'button pressed' event, otherwise 'false'.
hasMouseButtonPressedListener
boolean hasMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'button pressed' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'button pressed' event, otherwise 'false'.
hasMouseButtonReleasedListener
boolean hasMouseButtonReleasedListener (number mousekey)- Returns 'true' if the Model has a listener for the 'button released' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
boolean- 'True' if the Model has a listener for the 'button released' event, otherwise 'false'.
hasMouseButtonReleasedListener
boolean hasMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'button released' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'button released' event, otherwise 'false'.
hasMouseButtonTripleClickedListener
boolean hasMouseButtonTripleClickedListener (number mousekey)- Returns 'true' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
- Returns:
boolean- 'True' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.
hasMouseButtonTripleClickedListener
boolean hasMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.
hasMouseEnteredListener
boolean hasMouseEnteredListener ()- Returns 'true' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.
hasMouseEnteredListener
boolean hasMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.
hasMouseLeftListener
boolean hasMouseLeftListener ()- Returns 'true' if the Model has a listener for the 'mouse left' event, otherwise 'false'.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse left' event, otherwise 'false'.
hasMouseLeftListener
boolean hasMouseLeftListener (boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'mouse left' event, otherwise 'false'.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse left' event, otherwise 'false'.
hasMouseMovedListener
boolean hasMouseMovedListener ()- Returns 'true' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.
hasMouseMovedListener
boolean hasMouseMovedListener (boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.
hasMouseWheelMovedListener
boolean hasMouseWheelMovedListener (number mousekey)- Returns 'true' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.
hasMouseWheelMovedListener
boolean hasMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Returns 'true' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
- Returns:
boolean- 'True' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.
hasRayHitListener
boolean hasRayHitListener ()- Returns 'true' if the model has a 'ray hit' Listener, otherwise 'false'.
- Returns:
boolean- 'True' if the model has a 'ray hit' Listener, otherwise 'false'.
hasRepresentation
boolean hasRepresentation (representation other)- Returns 'true' if this representation has the other representation, otherwise 'false'.
- Parameters:
representation other- The other representation.
- Returns:
boolean- 'True' if this representation has the other representation, otherwise 'false'.
hasRepresentation
boolean hasRepresentation (string name, number type)- Returns 'true' if this representation has another representation with the specified name and type, otherwise 'false'.
- Parameters:
string name- Name of the representation.number type- Type of the representation
- Returns:
boolean- 'True' if this representation has another representation with the specified name and type, otherwise 'false'.
hasShape
boolean hasShape (string name)- Returns 'true' if the model has a shape with the specified name.
- Parameters:
string name- Name of the shape.
- Returns:
boolean- Whether the shape exists or not.
isCastShadowsEnabled
boolean isCastShadowsEnabled ()- Returns True if the Model can cast shadows, otherwise false.
- Returns:
boolean- True if the Model can cast shadows, otherwise false.
isCharacterCollisionEnabled
boolean isCharacterCollisionEnabled ()- Checks if the Model character collision is enabled.
- Returns:
boolean- 'True' if the Model character has collision enabled, otherwise 'false'.
isCharacterGravityEnabled
boolean isCharacterGravityEnabled ()- Checks if the Model character gravity is enabled.
- Returns:
boolean- 'True' if the Model character has gravity enabled, otherwise 'false'.
isPersistent
boolean isPersistent ()- Returns true if the representation is persistent, false otherwise.
- Returns:
boolean- Whether the Model is persistent or not.
isVisible
boolean isVisible ()- Returns 'true' if the representation is visible, 'false' otherwise.
- Returns:
boolean- Whether the Model is visible or not.
jump
nil jump ()- Starts a jump movement with the default height.
jump
nil jump (float height)- Starts a jump movement.
- Parameters:
float height- Maximum height the model will reach in the jump.
pauseAnimation
nil pauseAnimation (string anima)- Pause an animation in the model.
- Parameters:
string anima- Name of the animation.
playAnimation
nil playAnimation (string anima, number freq, boolean loop)- Plays an animation in the model.
- Parameters:
string anima- Name of the animation.number freq- Speed of the animation,boolean loop- Whether the animation is played in loop until explicitly stopped.
playAnimation
nil playAnimation (string anima, number frame)- Plays the specified frame of an animation in the model.
- Parameters:
string anima- Name of the animation.number frame- Frame to play,
playSurfaceTranslation
nil playSurfaceTranslation (number freq, boolean loop, array{} positions)- Moves over the surface and rotates the model horizontally through a set of positions and directions.
- Parameters:
number freq- Speed of the animation.boolean loop- Whether the animation plays in loop.array{} positions- An array points (x,z) and directions (dx,dz).
playTranslation
nil playTranslation (number freq, boolean loop, array{} positions)- Moves and rotates the model through a set of positions and directions.
- Parameters:
number freq- Speed of the animation.boolean loop- Whether the animation plays in loop.array{} positions- An array points (x,y,z) and directions (dx,dy,dz).
- Prints the Model data and attributes to the console.
removeAIMovementOnStartListener
nil removeAIMovementOnStartListener ()- Removes the listener from the model for the 'pathfind start' event.
removeAIMovementOnStopListener
nil removeAIMovementOnStopListener ()- Removes the listener from the model for the 'pathfind stopped' event.
removeAllRepresentations
nil removeAllRepresentations ()- Removes all representations contained in this representation.
removeAllShapes
nil removeAllShapes ()- Removes all shapes from the model.
removeMouseButtonClickedListener
nil removeMouseButtonClickedListener (number mousekey)- Removes the 'mouse button clicked' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
removeMouseButtonClickedListener
nil removeMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse button clicked' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseButtonDoubleClickedListener
nil removeMouseButtonDoubleClickedListener (number mousekey)- Removes the 'mouse button double clicked' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
removeMouseButtonDoubleClickedListener
nil removeMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse button double clicked' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseButtonPressedListener
nil removeMouseButtonPressedListener (number mousekey)- Removes the 'mouse button pressed' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
removeMouseButtonPressedListener
nil removeMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse button pressed' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseButtonReleasedListener
nil removeMouseButtonReleasedListener (number mousekey)- Removes the 'mouse button released' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
removeMouseButtonReleasedListener
nil removeMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse button released' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseButtonTripleClickedListener
nil removeMouseButtonTripleClickedListener (number mousekey)- Removes the 'mouse button triple clicked' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
removeMouseButtonTripleClickedListener
nil removeMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse button triple clicked' event listener of the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseEnteredListener
nil removeMouseEnteredListener ()- Removes the 'mouse entered' event listener of the Model.
removeMouseEnteredListener
nil removeMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse entered' event listener of the Model.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseLeftListener
nil removeMouseLeftListener ()- Removes the 'mouse left' event listener of the Model.
removeMouseLeftListener
nil removeMouseLeftListener (boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse left' event listener of the Model.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseMovedListener
nil removeMouseMovedListener ()- Removes the 'mouse moved' event listener of the Model.
removeMouseMovedListener
nil removeMouseMovedListener (boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse moved' event listener of the Model.
- Parameters:
boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removeMouseWheelMovedListener
nil removeMouseWheelMovedListener (number mousekey)- Removes the 'mouse wheel moved' event listener of the Model.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
removeMouseWheelMovedListener
nil removeMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)- Removes the 'mouse wheel moved' event listener of the Model.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.
removePhysics
nil removePhysics ()- Removes physics from the model. Warning: it removes all shapes and joints the model has.
removeRepresentation
nil removeRepresentation (representation other)- Removes a representation from this representation.
- Parameters:
representation other- The representation to be removed.
removeRepresentation
nil removeRepresentation (string name, number type)- Removes a representation with the specified name and type from this representation.
- Parameters:
string name- Name of the representation.number type- Type of the representation
removeShape
nil removeShape (string name)- Removes a shape with the specified name.
- Parameters:
string name- Name of the shape.
rotateAroundVector
nil rotateAroundVector (number angle, number x, number y, number z)- Rotates the Model around the specified vector.
- Parameters:
number angle- Rotation angle (degrees).number x- X coordinate of the rotation vector.number y- Y coordinate of the rotation vector.number z- z coordinate of the rotation vector.
rotatePitch
nil rotatePitch (number angle)- Rotates the pitch of the Model.
- Parameters:
number angle- Rotation angle (degrees).
rotateRoll
nil rotateRoll (number angle)- Rotates the roll of the Model.
- Parameters:
number angle- Rotation angle (degrees).
rotateYaw
nil rotateYaw (number angle)- Rotates the yaw of the Model.
- Parameters:
number angle- Rotation angle (degrees).
setAIMovementOnStartListener
nil setAIMovementOnStartListener (Object target, string name, InterModel interactionModel, boolean global, string channel)- Sets a listener to be invoked upon a 'pathfind started' event on the model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setAIMovementOnStopListener
nil setAIMovementOnStopListener (Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'pathfind stopped' event on the model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setAIMovementOnStopListener
nil setAIMovementOnStopListener (Object target, string name, InterModel interactionModel, boolean global, string channel)- Sets a listener to be invoked upon a 'pathfind stopped' event on the model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setAnimationMask
nil setAnimationMask (string animation, array{} n})- Creates an animation mask for animation blending between two or more animations playing at the same time.
- Parameters:
string animation- name.array{} n}- weights (between 0 and 1) for the n bones of the model.
setCastShadowsEnabled
nil setCastShadowsEnabled (boolean shadows)- Turns on/off the casting of shadows by the Model.
- Parameters:
boolean shadows- Whether the Model casts shadows or not.
setCharacterCollisionEnabled
nil setCharacterCollisionEnabled (boolean collision)- Enable/Disables the Model character collision.
- Parameters:
boolean collision- Whether the Models character colides with other objects.
setCharacterGravityEnabled
nil setCharacterGravityEnabled (boolean collision)- Enable/Disables the Model character gravity.
- Parameters:
boolean collision- Whether the Models character is affected by gravity.
setCharacterHeight
nil setCharacterHeight (number height)- Sets the Model character shape height.
- Parameters:
number height- Model character shape height.
setCharacterJumpHeight
nil setCharacterJumpHeight (number maxSlope)- Sets the maximum slope that the Model character can climb
- Parameters:
number maxSlope- Maximum slope that the Model character can climb
setCharacterJumpHeight
nil setCharacterJumpHeight (number jumpHeight)- Sets the jump height of the Model character
- Parameters:
number jumpHeight- Jump height of the Model character
setCharacterOffset
nil setCharacterOffset (number offsetX, number offsetY, number offsetZ)- Gets the Model character shape position offset
- Parameters:
number offsetX- Offset X coordinate.number offsetY- Offset Y coordinate.number offsetZ- Offset Z coordinate.
setCharacterRadius
nil setCharacterRadius (number radius)- Sets the Model character shape radius.
- Parameters:
number radius- Model character shape radius.
setCharacterRotation
nil setCharacterRotation (number rotation)- Sets the Model character shape rotation.
- Parameters:
number rotation- Model character shape rotation.
setCharacterSpeed
nil setCharacterSpeed (number speedFront, number speedBack, number speedStrafe, number speedRotate)- Sets the Model character movement speed.
- Parameters:
number speedFront- Model character movement forward speed.number speedBack- Model character movement backward speed.number speedStrafe- Model character movement strafe speed.number speedRotate- Model character movement rotate speed.
setCharacterSpeedBack
nil setCharacterSpeedBack (number speedBack)- Sets the Model character movement backward speed.
- Parameters:
number speedBack- Model character movement backward speed.
setCharacterSpeedFront
nil setCharacterSpeedFront (number speedFront)- Sets the Model character movement forward speed.
- Parameters:
number speedFront- Model character movement forward speed.
setCharacterSpeedStrafe
nil setCharacterSpeedStrafe (number speedStrafe)- Sets the Model character movement strafe speed.
- Parameters:
number speedStrafe- Model character movement strafe speed.
setCharacterStepHeight
nil setCharacterStepHeight (number stepHeight)- Sets the step height of the Model character
- Parameters:
number stepHeight- Step height of the Model character
setMaterial
nil setMaterial (string material)- Sets a material to every sub-meshs.
- Parameters:
string material- The Material name.
setMaterial
nil setMaterial (string material, number submesh)- Sets a material to a sub-mesh.
- Parameters:
string material- The Material name.number submesh- The number of the sub-mesh where the material will be applied.
setMouseButtonDoubleClickedListener
nil setMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse button double clicked' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseButtonDoubleClickedListener
nil setMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse button double clicked' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseButtonPressedListener
nil setMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse button pressed' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseButtonPressedListener
nil setMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse button pressed' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseButtonReleasedListener
nil setMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse button released' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseButtonReleasedListener
nil setMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse button released' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseButtonTripleClickedListener
nil setMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse button triple clicked' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseButtonTripleClickedListener
nil setMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse button triple clicked' event on the Model.
- Parameters:
number mousekey- Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseEnteredListener
nil setMouseEnteredListener (Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse enter' event on the Model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseEnteredListener
nil setMouseEnteredListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse enter' event on the Model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseLeftListener
nil setMouseLeftListener (Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse leave' event on the Model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseLeftListener
nil setMouseLeftListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse leave' event on the Model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseMovedListener
nil setMouseMovedListener (Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse move' event on the Model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseMovedListener
nil setMouseMovedListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse move' event on the Model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setMouseWheelMovedListener
nil setMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'mouse wheel moved' event on the Model.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setMouseWheelMovedListener
nil setMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)- Sets a listener to be invoked upon a 'mouse wheel moved' event on the Model.
- Parameters:
number mousekey- Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean ctrl- Whether the key combination includes the 'ctrl' modifier key.boolean alt- Whether the key combination includes the 'alt' modifier key.boolean shift- Whether the key combination includes the 'shift' modifier key.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setPersistent
nil setPersistent (boolean persistent)- Makes the Model persistent or not persistent.
- Parameters:
boolean persistent- Whether the Model is persistent or not.
setPhysicsCharacter
nil setPhysicsCharacter ()- Sets the physics type of the model to character. Warning: it removes all shapes and joints the model has.
setPhysicsCharacter
nil setPhysicsCharacter (number syncType)- Sets the physics type of the model to character. Warning: it removes all shapes and joints the model has.
- Parameters:
number syncType- Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.
setPhysicsCharacter
nil setPhysicsCharacter (number syncType, number mass)- Sets the physics type of the model to character. Warning: it removes all shapes and joints the model has.
- Parameters:
number syncType- Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.number mass- Mass of the object.
setPhysicsDynamic
nil setPhysicsDynamic ()- Sets the physics type of the model to dynamic. The mass will be calculated based on the volume of the object. Warning: it removes all shapes and joints the model has.
setPhysicsDynamic
nil setPhysicsDynamic (number syncType)- Sets the physics type of the model to dynamic. Warning: it removes all shapes and joints the model has.
- Parameters:
number syncType- Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.
setPhysicsDynamic
nil setPhysicsDynamic (number syncType, number mass)- Sets the physics type of the model to dynamic. Warning: it removes all shapes and joints the model has.
- Parameters:
number syncType- Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.number mass- Mass of the object.
setPhysicsMass
nil setPhysicsMass (number mass)- Sets the mass of the physics object currently applied to the Model.
- Parameters:
number mass- Mass of the object.
setPhysicsStatic
nil setPhysicsStatic ()- Sets the physics type of the model to static. Warning: it removes all shapes and joints the model has.
setPhysicsSync
nil setPhysicsSync (number syncType)- Sets the synchronization type of the physics object currently applied to the Model.
- Parameters:
number syncType- Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.
setPosition
nil setPosition (number x, number y, number z)- Sets the position of the Model in the 3D space (x,y,z).
- Parameters:
number x- New position in the X axis.number y- New position in the Y axis.number z- New position in the Z axis.
setQuaternion
nil setQuaternion (number w, number x, number y, number z)- Rotates the Model in the 3D space through quaternion coordinates (w,x,y,z).
- Parameters:
number w- W coordinate.number x- X coordinate.number y- Y coordinate.number z- Z coordinate.
setRayHitListener
nil setRayHitListener (Object target, string name, InterModel interactionModel)- Sets a listener to be invoked upon a 'ray hit stopped' event on the model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.
setRayHitListener
nil setRayHitListener (Object target, string name, InterModel interactionModel, boolean global, string channel)- Sets a listener to be invoked upon a 'ray hit stopped' event on the model.
- Parameters:
Object target- The object that contains the interaction that will be executed.string name- Name of the interaction.InterModel interactionModel- Arguments of the interaction that will be executed when this listener is activated.boolean global- 'true' if this listener is executed globally, 'false' if it is executed only locally.string channel- The channel of the listener.
setRotation
nil setRotation (number x, number y, number z)- Sets the Model rotation in the 3D space, according to the angle that the given point (x,y,z) has with the origin.
- Parameters:
number x- X coordinate.number y- Y coordinate.number z- Z coordinate.
setScale
nil setScale (number x, number y, number z)- Scales the Model.
- Parameters:
number x- Scale ratio in the X coordinate.number y- Scale ratio in the Y coordinate.number z- Scale ratio in the Z coordinate.
setShapeHeight
nil setShapeHeight (string name, number height)- Sets the height of the shape.
- Parameters:
string name- Name of the shape.number height- Height of the shape.
setShapeOrientation
nil setShapeOrientation (string name, number ow, number ox, number oy, number oz)- Sets the orientation of the shape.
- Parameters:
string name- Name of the shape.number ow- W angle for the shape orientation.number ox- X axis for the shape orientation.number oy- Y axis for the shape orientation.number oz- Z axis for the shape orientation.
setShapePhysicsMaterial
nil setShapePhysicsMaterial (string name, string physicsMaterial)- Sets the physics material of the shape.
- Parameters:
string name- Name of the shape.string physicsMaterial- Physics material of the shape.
setShapePosition
nil setShapePosition (string name, number x, number y, number z)- Sets the relative position of the shape.
- Parameters:
string name- Name of the shape.number x- X coordinate for the relative position.number y- Y coordinate for the relative position.number z- Z coordinate for the relative position.
setShapeRadius
nil setShapeRadius (string name, number radius)- Sets the radius of the shape.
- Parameters:
string name- Name of the shape.number radius- Radius of the shape.
setShapeScale
nil setShapeScale (string name, number sx, number sy, number sz)- Sets the scale of the shape.
- Parameters:
string name- Name of the shape.number sx- X coordinate for the scale.number sy- Y coordinate for the scale.number sz- Z coordinate for the scale.
setSurfacePosition
nil setSurfacePosition (number x, number y, number z)- Moves the model to another position in the surface of the terrain, i.e., the Y coordinate will be the height of the terrain at that point.
- Parameters:
number x- The X coordinate of the position.number y- The Y coordinate of the offset of the position.number z- The Z coordinate of the position.
setSurfacePosition
nil setSurfacePosition (number x, number z)- Moves the model to another position in the surface of the terrain, i.e., the Y coordinate will be the height of the terrain at that point.
- Parameters:
number x- The X coordinate of the position.number z- The Z coordinate of the position.
setSurfacePosition
nil setSurfacePosition (number x, number y, number z)- Moves the model to another position in the surface of the terrain, i.e., the Y coordinate will be the height of the terrain at that point plus offset.
- Parameters:
number x- The X coordinate of the position.number y- The Y offset of the position.number z- The Y coordinate of the position.
setVehicleGear
nil setVehicleGear (unsigned int)- Changes the current gear of the vehicle.
- Parameters:
unsigned int- gear Gear to which the vehicle engine will shift
setVisible
nil setVisible (boolean visible)- Makes the Model visible or invisible.
- Parameters:
boolean visible- Whether the Model is visible or not.
startMovementBackward
nil startMovementBackward ()- Starts backward movement with the default speed.
startMovementBackward
nil startMovementBackward (float speed)- Starts backward movement.
- Parameters:
float speed- Linear speed of the backward movement.
startMovementForward
nil startMovementForward ()- Starts forward movement with the default speed.
startMovementForward
nil startMovementForward (float speed)- Starts forward movement.
- Parameters:
float speed- Linear speed of the forward movement.
startMovementRotateLeft
nil startMovementRotateLeft ()- Starts rotate left movement with the default speed.
startMovementRotateLeft
nil startMovementRotateLeft (float speed)- Starts rotate left movement.
- Parameters:
float speed- Linear speed of the rotate left movement.
startMovementRotateRight
nil startMovementRotateRight ()- Starts rotate right movement with the default speed.
startMovementRotateRight
nil startMovementRotateRight (float speed)- Starts rotate right movement.
- Parameters:
float speed- Linear speed of the rotate right movement.
startMovementStrafeLeft
nil startMovementStrafeLeft ()- Starts strafe left movement with the default speed.
startMovementStrafeLeft
nil startMovementStrafeLeft (float speed)- Starts starfe left movement.
- Parameters:
float speed- Linear speed of the strafe left movement.
startMovementStrafeRight
nil startMovementStrafeRight ()- Starts strafe right movement with the default speed.
startMovementStrafeRight
nil startMovementStrafeRight (float speed)- Starts starfe right movement.
- Parameters:
float speed- Linear speed of the strafe right movement.
stop
nil stop ()- Stops all AI current movements
stopAnimation
nil stopAnimation (string anima)- Stops the animation in the Model.
- Parameters:
string anima- Name of the animation.
stopMovementBackward
nil stopMovementBackward ()- Stops backward movement.
stopMovementForward
nil stopMovementForward ()- Stops forward movement.
stopMovementRotateLeft
nil stopMovementRotateLeft ()- Stops rotate left movement.
stopMovementRotateRight
nil stopMovementRotateRight ()- Stops rotate right movement.
stopMovementStrafeLeft
nil stopMovementStrafeLeft ()- Stops strafe left movement.
stopMovementStrafeRight
nil stopMovementStrafeRight ()- Stops strafe right movement.
stopTranslation
nil stopTranslation ()- Stops the translaction animation.
turnTo
nil turnTo (float angle)- Starts character AI turning movement towards the specified angle.
- Parameters:
float angle- Angle to which the character will turn towards
turnTo
nil turnTo (float angle, float turnSpeed)- Starts character AI turning movement towards the specified angle.
- Parameters:
float angle- Angle to which the character will turn towardsfloat turnSpeed- The speed at which the Model will turn.

