TransformProxyComponentclass

Help to implement a component that completely overrides the transform. This is useful for scenarios where you will want to keep the local transform of a GameObject, but want to offset based on that for some reason. Having multiple of these on one GameObject is not supported, and will result in weirdness.

objectComponentTransformProxyComponent
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public abstract class Sandbox.TransformProxyComponent : Sandbox.Component

Constructors1

Showing 1 constructors

Methods7

Showing 7 methods

public virtual Transform GetLocalTransform()PUBLICVIRTUAL

Override to provide the local transform

Returns:Transform

public virtual Transform GetWorldTransform()PUBLICVIRTUAL

Override to provide the world transform. The default implementation will calculate it using GetLocalTransform() based on the parent.

Returns:Transform

public void MarkTransformChanged()PUBLIC

Tell our other components, and our children that our transform has changed. This will update things like Renderers to update their render positions.

Returns:void

protected virtual void OnDisabled()PROTECTEDVIRTUALLIFECYCLE

Returns:void

protected virtual void OnEnabled()PROTECTEDVIRTUALLIFECYCLE

Returns:void

public virtual void SetLocalTransform(Transform& modreq(System.Runtime.InteropServices.InAttribute) value)PUBLICVIRTUAL

ParameterTypeDescription
valueTransform& modreq(InAttribute)
Returns:void

public virtual void SetWorldTransform(Transform value)PUBLICVIRTUAL

Called when the world transform is being set

ParameterTypeDescription
valueTransform
Returns:void

On this page