class TransformProxyComponent : Component

book_4_sparkGenerated
code_blocksInput

Description

The TransformProxyComponent class in the Sandbox namespace is designed to help implement a component that completely overrides the transform of a GameObject. This is particularly useful in scenarios where you want to maintain the local transform of a GameObject but apply an offset for specific reasons. Note that having multiple instances of this component on a single GameObject is not supported and may lead to unexpected behavior.

Members

Instance Methods

Member NameSummary
GetLocalTransformOverride to provide the local transform.
SetLocalTransformCalled when the local transform is being set.
GetWorldTransformOverride to provide the world transform. The default implementation calculates it using GetLocalTransform() based on the parent.
SetWorldTransformCalled when the world transform is being set.
MarkTransformChangedNotify other components and children that the transform has changed, updating elements like Renderers to adjust their render positions.