Editor.Model.WorldTransformAccessor
ClassProvides read and write access to an entity's world-space transform.
Index
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
for (const sceneObject of scene.rootSceneObjects) {
const wt = sceneObject.worldTransform;
console.log(`SceneObject: ${sceneObject.name}`);
console.log(` world position: ${wt.position}`);
console.log(` world rotation: ${wt.rotation}`);
console.log(` world scale: ${wt.scale}`);
}
Extends
Properties
position
position:
vec3
World-space position of the object as a vec3.
rotation
rotation:
vec3
World-space rotation of the object in Euler angles as a vec3.
scale
scale:
vec3
World-space scale of the object as a vec3.
Methods
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean