TorqueScript Reference
|
Inherits GuiControl.
Boolean addInputListener | ( | inputListener | ) |
Adds an object as an input listener.
inputListener | The object to add as an input listener. |
void clampCameraViewLimit | ( | ) |
Clamps the current camera to the current view limit. Nothing will happen if the view-limit is not active or the camera is moving.
void completeCameraMove | ( | ) |
Moves camera directly to target.
void dismount | ( | ) |
Dismounts Camera from object.
void dismountMe | ( | SceneObject * | pSceneObject | ) |
String getBackgroundColor | ( | ... | ) |
Gets the background color for the scene.
Float getCameraAngle | ( | ) |
Gets the current camera angle.
String getCameraArea | ( | ) |
Get the current camera Area.
String getCameraPosition | ( | ) |
Get the current camera position.
String getCameraRenderPosition | ( | ) |
Get current camera position post-view-limit clamping.
String getCameraRenderScale | ( | ) |
Get current camera scale to render.
String getCameraSize | ( | ) |
Get the current camera size.
String getCameraWorldScale | ( | ) |
Get current camera scale to world.
Float getCameraZoom | ( | ) |
Get the current camera Zoom.
String getCanvasPoint | ( | X/ | Y | ) |
Returns Canvas coordinate of Window coordinate.
x,y | The coordinates in world coordinates you wish to convert to window coordinates. Accepts either (x,y) or ( y\ |
Boolean getIsCameraMounted | ( | ) |
Check the camera mounted status.
Boolean getIsCameraMoving | ( | ) |
Check the camera moving status.
Boolean getIsWindowPoint | ( | X/ | Y | ) |
Checks if World coordinate is inside Window.
x,y | The coordinates in world coordinates you wish to check. Accepts either (x,y) or ( y\ |
Boolean getLockMouse | ( | ) |
Gets the window mouse-lock status.
String getMousePosition | ( | ) |
Gets Current Mouse Position.
Integer getRenderGroupMask | ( | ) |
Gets the group mask which controls what is rendered.
Integer getRenderLayerMask | ( | ) |
Gets the layer mask which controls what is rendered.
String getScene | ( | ) |
Returns the Scene associated with this window.
Float getTargetCameraAngle | ( | ) |
Gets the target camera angle.
String getTargetCameraArea | ( | ) |
Get the target camera Area.
String getTargetCameraPosition | ( | ) |
Get the target camera position.
String getTargetCameraSize | ( | ) |
Get the target camera size.
Float getTargetCameraZoom | ( | ) |
Get the target camera Zoom.
Boolean getUseBackgroundColor | ( | ... | ) |
Gets whether the scene background color is in use or not.
Boolean getUseObjectInputEvents | ( | ) |
Gets whether input events are passed onto scene objects or not.
Boolean getUseWindowInputEvents | ( | ) |
Gets whether input events are monitored by the window or not.
String getWindowExtents | ( | ) |
Fetch Window Extents (Position/Size).
String getWindowPoint | ( | X/ | Y | ) |
Returns Window coordinate of World coordinate.
x,y | The coordinates in world coordinates you wish to convert to window coordinates. Accepts either (x,y) or ( y\ |
String getWorldPoint | ( | X/ | Y | ) |
Returns World coordinate of Window coordinate.
x,y | The coordinates in window coordinates you wish to convert to world coordinates. Accepts either (x,y) or ( y\ |
void mount | ( | sceneObject | ) |
Mounts the camera onto the specified object.
sceneObject | The scene object to mount the camera to. |
offsetX | / offsetY The offset from the objects position to mount the camera to. Optional: Defaults to no offset. |
mountForce | The force to use to keep the camera mounted to the object. Zero is a rigid mount. Optional: Defaults to zero. |
sendToMount | Whether to immediately move the camera to the objects position or not. Optional: Defaults to true. |
mountAngle | Whether to mount the cameras angle to the objects angle or not. Optional: Defaults to false. |
Boolean removeInputListener | ( | inputListener | ) |
Removes an object from being an input listener.
inputListener | The object to remove as an input listener. |
void resetScene | ( | ) |
Detaches the window from any Scene Object.
void setAudioListener | ( | ) |
Sets this Scenewindow to process the AudioListener's position and velocity WARNING : The code does not verify if multiple SceneWindows have this function enabled. User must make sure to manage this manually. Multiple listeners may lead to crashes/bugs/unexpected behaviors.
status | - Whether to enable or disable AudioListener processing (optional, default to true) |
void setBackgroundColor | ( | float | red, |
float | green, | ||
float | blue | ||
) |
or ( stockColorName ) - Sets the background color for the scene.
red | The red value. |
green | The green value. |
blue | The blue value. |
alpha | The alpha value. |
void setCameraAngle | ( | angle | ) |
Sets the current camera angle.
angle | The current camera angle in degrees. |
void setCameraArea | ( | x1/y1/x2/ | y2 | ) |
Set the current camera area.
x1,y1,x2,y2 | The coordinates of the minimum and maximum points (top left, bottom right) The input can be formatted as either y1 x2 y2\, y1, x2 y2\, , y1, x2, y2\ |
void setCameraInterpolationMode | ( | interpolationMode | ) |
Set camera interpolation mode.
void setCameraInterpolationTime | ( | interpolationTime | ) |
Set camera interpolation time.
void setCameraPosition | ( | x | , |
y | |||
) |
Set the current camera position.
X | Position along the X axis. |
Y | Position along the Y axis. |
void setCameraSize | ( | width | , |
height | |||
) |
Set the current camera position.
width | Size along the X axis. |
height | Size along the Y axis. |
void setCameraZoom | ( | zoomFactor | ) |
Set the current camera Zoom Factor.
zoomFactor | A float value representing the zoom factor |
void setLockMouse | ( | bool | lockSet | ) |
Sets the window mouse-lock status.
void setMousePosition | ( | x/ | y | ) |
Sets Current Mouse Position.
x,y | The coordinates to set the mouse cursor. Accepts either (x,y) or ( y\ |
void setObjectInputEventFilter | ( | groupMask | , |
layerMask | |||
) |
Sets input filter for input events.
void setObjectInputEventGroupFilter | ( | groups | $ | ) |
Sets the input events group filter.
List | of groups to filter input events with. |
void setObjectInputEventInvisibleFilter | ( | bool | useInvisibleFilter | ) |
Sets whether invisible objects should be filtered for input events or not.
void setObjectInputEventLayerFilter | ( | layers | $ | ) |
Sets the input events layer filter.
The | list of layers to filter input events with. |
void setRenderGroups | ( | groups | $ | ) |
Sets the render group(s).
groups | The list of groups you wish to set. |
void setRenderLayers | ( | layers | $ | ) |
Sets the render layers(s).
The | layer numbers you wish to set. |
void setRenderMasks | ( | layerMask | , |
groupMask | |||
) |
Sets the layer/group mask which control what is rendered.
layermask | The bitmask for setting the layers to render |
groupmask | The bitmask for setting the groups to render |
void setScene | ( | Scene | ) |
void setTargetCameraAngle | ( | angle | ) |
Sets the target camera angle.
angle | The target camera angle in degrees. |
void setTargetCameraArea | ( | x1/y1/x2/ | y2 | ) |
Set the target camera area.
x1 | / y1 Coordinates of the upper left corner of the target area. |
x2 | / y2 Coordinates of the lower right corner of the target area. |
void setTargetCameraPosition | ( | x | , |
y | |||
) |
Set the target camera position.
X | Position along the X axis. |
Y | Position along the Y axis. |
void setTargetCameraSize | ( | width | , |
height | |||
) |
Set the target camera position.
width | Size along the X axis. |
height | Size along the Y axis. |
void setTargetCameraZoom | ( | zoomFactor | ) |
Set the target camera Zoom Factor.
void setUseBackgroundColor | ( | ... | ) |
Sets whether to use the scene background color or not.
useBackgroundColor | Whether to use the scene background color or not. |
void setUseObjectInputEvents | ( | inputStatus | ) |
Sets whether input events are passed onto scene objects or not.
mouseStatus | Whether input events are passed onto scene objects or not. |
void setUseWindowInputEvents | ( | inputStatus | ) |
Sets whether input events are monitored by the window or not.
inputStatus | Whether input events are processed by the window or not. |
void setViewLimitOff | ( | ) |
Set View Limit Off.
void setViewLimitOn | ( | ) |
Set View Limit On.
void startCameraMove | ( | ) |
Start Camera Move.
void startCameraShake | ( | shakeMagnitude | , |
time | |||
) |
Starts the camera shaking.
shakeMagnitude | The intensity of the shaking |
time | The length of the shake |
void stopCameraMove | ( | ) |
Stops current camera movement
void stopCameraShake | ( | ) |
Stops the camera shaking.
void undoCameraMove | ( | ) |
Reverses previous camera movement.