Skip to main content

Editor.Model.WorldTransformAccessor

Class

Provides 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()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame