Api Sandbox GameTransform
class

GameTransform

public class GameTransform

Properties

Name Type Description
GameObject GameObject
Proxy TransformProxy
InterpolatedLocal Transform The current interpolated local transform.
Local Transform The current local transform.
World Transform The current world transform.
Position Vector3 The position in world coordinates.
Rotation Rotation The rotation in world coordinates.
Scale Vector3 The scale in world coordinates.
LocalPosition Vector3 Position in local coordinates.
LocalRotation Rotation Rotation in local coordinates.
LocalScale Vector3 Scale in local coordinates.

Methods

Void LerpTo(Transform target, Single frac)

Performs linear interpolation between this and the given transform.

target — The destination transform.
frac — Fraction, where 0 would return this, 0.5 would return a point between this and given transform, and 1 would return the given transform.
IDisposable DisableProxy()

Disable the proxy temporarily

Void ClearInterpolation()

Clear any interpolation and force us to reach our final destination immediately. If we own this object we'll tell other clients to clear interpolation too when they receive the next network update from us.

Void ClearLerp()

Fields

Name Type Description
OnTransformChanged Action Called when the transform is changed
Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.GameTransform