Clones the entire hierarchy tree, including node. Returns the clone of node. All cloned descendants are in the new hierarchy. This function is like CloneTree, but takes an explicit entity command buffer. This function can be slow. Use it sparingly.
Computes a new Object to World matrix of the kind produced in the TransformObjectToWorld component. This function does not use TransformObjectToWorld, and can be quite resource intensive. Use it only if the cached result in TransformLocal is not available.
Computes a transform node's world position. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), and returns the position of that.
This function can be quite resource intensive. When possible, read the TransformObjectToWorld component instead.
Computes a transform node's world rotation. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), and returns the rotation of that.
This function can be quite resource intensive. When possible, read the TransformObjectToWorld component instead.
Computes a transform node's world scale. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), and returns the scale of that.
If the transform does not include skew, use computeWorldScaleLossy instead.
This function can be quite resource intensive. If possible, read the TransformObjectToWorld component instead.
Computes a transform node's world scale. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), and returns the scale of that.
Because lossy scale does not include skew, it does not include enough information to recreate a full 4x4 matrix from rotation, position, and lossy scale in 3D.
This function can be quite resource intensive. If possible, read the TransformObjectToWorld component instead.
Destroys all of node's children recursively. The destroySelf parameter specifies whether to also destroy the entity along with its children. This function is like DestroyTree, but takes an explicit entity command buffer. This function can be slow. Use it sparingly.
Finds a child entity of node with the given name. You can search deeper in the hierarchy to find a child of a child entity, a child of that child, and so on by separating the levels with forward slashes (/) in the name.
For example Find(node, "a/b/c") is the same as Find(Find(Find(node,"a"),"b"),"c");
Initial lookups can be slow, but are cached if successful. Failed lookups are not cached.
Returns a child entity at the given index. If the index is out of range, returns Entity.NONE. Note that because the order of children can change at any time, a given index does not return the same child every time. In most cases, you can obtain better results by using the Find function or caching children locally. Avoid using this function in inner loops, where it can be very slow.
Inverse-transforms a position by the TransformObjectToWorld matrix. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), then transforms by that.
This function can be quite resource intensive. When possible, read the TransformObjectToWorld component instead.
Inverse-transforms a rotation by the TransformObjectToWorld matrix. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), then transforms by that.
This function can be quite resource intensive. When possible, read the TransformObjectToWorld component instead.
Inverse-transforms a scale by the TransformObjectToWorld matrix. This function uses the computeWorldMatrix function to compute the world matrix (bypassing caching), then transforms by that.
This function can be quite resource intensive. When possible, read the TransformObjectToWorld component instead.
Sets the parent of all of node's child entities to NONE. This function is like RemoveAllChildren, but takes an explicit entity command buffer. Avoid using this function in inner loops, where it can be very slow.
Completely removes this node from the hierarchy, and sets the parent of all of its children to NONE. This function is like Unlink, but takes an explicit entity command buffer. Avoid using this function in inner loops, where it can be very slow.
Helper function for transforming from window to world coordinates. This only works if cameraEntity has a valid TransformObjectToWorld component. The windowPos (window position) and windowSize (window size) should be in the same coordinates. The Z coordinate is set to 0.
Helper function for transforming from world to window coordinates. This only works if the cameraEntity has a valid TransformObjectToWorld component. Returns windowPos (window position) and windowSize (window size) in the same coordinates.
Generated using TypeDoc
Provides a variety of convenience functions for transforms.