align(_:to:)
Moves and rotates the entity by a transformation from the origin pin to the target pin.
Declaration
@discardableResult @MainActor @preconcurrency func align(_ originPin: GeometricPin, to targetPin: GeometricPin) -> float4x4?Parameters
- originPin:
The
GeometricPinto align. It should be one of the pins on the entity. - targetPin:
The
GeometricPinto align to.
Return Value
Transformation matrix that has been applied to the Entity, in the frame or reference of the parent of the Entity. If either pin doesn’t exist, returns nil.