Instance Method

transformMatrix(relativeTo:)

Gets the 4x4 transform matrix of an entity relative to the given entity.

Declaration

func transformMatrix(relativeTo referenceEntity: Entity?) -> float4x4

Parameters

referenceEntity

The entity that defines a frame of reference. Set this to nil to indicate world space.

Return Value

The transform of the entity relative to referenceEntity.

See Also

Using a Matrix

func setTransformMatrix(float4x4, relativeTo: Entity?)

Sets the transform of the entity relative to the given reference entity using a 4x4 matrix representation.