Table of Contents
GAME_OBJECT
Abstract class
Category: Data
Properties
Position
Scale
Orientation
Name
Active
- Type:
boolean
- Expected:
boolean value
Functions
translate
move
resetOrientation
void resetOrientation()
lookAt
void lookAt(target [, up [, lockOnUpAxis]])
void lookAt(target, lockOnUpAxis)
Name | Type | Description |
---|---|---|
target | vec3f | |
lockOnUpAxis | boolean |
rotateAround
void rotateAround(pivot, rotation)
Name | Type | Description |
---|---|---|
pivot | vec3f | |
rotation | quaternion |
void rotateAround(pivot, vector, angle)
rotate
rotateX
void rotateX(ax)
Name | Type | Description |
---|---|---|
ax | float |
rotateY
void rotateY(ay)
Name | Type | Description |
---|---|---|
ay | float |
rotateZ
void rotateZ(az)
Name | Type | Description |
---|---|---|
az | float |
setRotationX
void setRotationX(ax)
Name | Type | Description |
---|---|---|
ax | float |
setRotationY
void setRotationY(ay)
Name | Type | Description |
---|---|---|
ay | float |
setRotationZ
void setRotationZ(az)
Name | Type | Description |
---|---|---|
az | float |
rotateLocal
rotateLocalX
void rotateLocalX(ax)
Name | Type | Description |
---|---|---|
ax | float |
rotateLocalY
void rotateLocalY(ay)
Name | Type | Description |
---|---|---|
ay | float |
rotateLocalZ
void rotateLocalZ(az)
Name | Type | Description |
---|---|---|
az | float |
setScale
void setScale(scale)
Name | Type | Description |
---|---|---|
scale | float |
scale
void scale(scale)
Name | Type | Description |
---|---|---|
scale | vec3f |
void scale(scale)
Name | Type | Description |
---|---|---|
scale | float |
scaleAround
generateGlobalMatrix
setLocalMatrix
setGlobalPosition
setGlobalOrientation
setGlobalTransform
void setGlobalTransform(position, orientation)
Name | Type | Description |
---|---|---|
position | vec3f | |
orientation | quaternion |
void setGlobalTransform(position, orientation, scale)
Name | Type | Description |
---|---|---|
position | vec3f | |
orientation | quaternion | |
scale | vec3f |
setGlobalMatrix
setGlobalMatrixIgnoreScale
getGlobalPosition
vec3f getGlobalPosition()
getGlobalOrientation
quaternion getGlobalOrientation()
globalLookAt
getLevel
LEVEL getLevel()
destroy
void destroy()
destroyAllChild
void destroyAllChild()
getParent
GAME_OBJECT getParent()
setParent
void setParent(parent [, keepWorldTransform])
Name | Type | Description |
---|---|---|
parent | GAME_OBJECT | |
keepWorldTransform | boolean |
isParentedTo
forEachChild
void forEachChild(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(GAME_OBJECT child)> | If false is returned, the iteration stops. Returns true by default. |
forEachChildRecursive
void forEachChildRecursive(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(GAME_OBJECT child)> | If false is returned, the iteration stops. Returns true by default. |
forEachComponent
void forEachComponent(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(COMPONENT)> | If false is returned, the iteration stops. Returns true by default. |
forEachComponentReverse
void forEachComponentReverse(function)
Name | Type | Description |
---|---|---|
function | function<void|boolean(COMPONENT)> | If false is returned, the iteration stops. Returns true by default. |
buildMinMaxBounding
boolean buildMinMaxBounding(outMin, outMax)
Name | Type | Description |
---|---|---|
outMin | vec3f | Out argument |
outMax | vec3f | Out argument |
getId
Guid getId()
addComponent
COMPONENT addComponent(componentType [, enabled])
Name | Type | Description |
---|---|---|
componentType | component type | |
enabled | boolean |
getOrCreateComponent
COMPONENT getOrCreateComponent(componentType [, replaceExistingVariant])
Name | Type | Description |
---|---|---|
componentType | component type | |
replaceExistingVariant | boolean |
getComponent
getEnabledComponent
removeComponent
findFirstParentWithComponent
findFirstObjectWithComponentUp
findFirstObjectWithComponentDown
COMPONENT findFirstObjectWithComponentDown(type [, ignoreDestroyingObject])
Name | Type | Description |
---|---|---|
type | component type | |
ignoreDestroyingObject | boolean |