Class NetworkTransform
This component is used to replicate the position and rotation of an object.
[IgnoreCodeGen]
[ExecutionOrder(-1000)]
public class NetworkTransform : NetworkBehaviour, INetickNetworkScript, INetickScript, IClientSimulationCallbacks
- Inheritance
-
NetworkTransform
- Implements
- Derived
- Inherited Members
Constructors
NetworkTransform()
public NetworkTransform()
Fields
CorrectionMultiplier
public float CorrectionMultiplier
Field Value
RenderTransform
public Transform RenderTransform
Field Value
- Transform
TeleportDistance
public float TeleportDistance
Field Value
TeleportErrorThreshold
public float TeleportErrorThreshold
Field Value
TransformSpace
protected TransformSpace TransformSpace
Field Value
_posInversePrecision
protected float _posInversePrecision
Field Value
_posPrecision
protected float _posPrecision
Field Value
_rotInversePrecision
protected float _rotInversePrecision
Field Value
_rotPrecision
protected float _rotPrecision
Field Value
_syncPosition
protected bool _syncPosition
Field Value
_syncRot
protected bool _syncRot
Field Value
Properties
InterpolationSource
public InterpolationSource InterpolationSource { get; set; }
Property Value
Position
public Vector3 Position { get; }
Property Value
- Vector3
Rotation
public Quaternion Rotation { get; }
Property Value
- Quaternion
Methods
GameEngineIntoNetcode()
public override void GameEngineIntoNetcode()
GetInterpolatedPosRot(out Vector3, out Quaternion)
public bool GetInterpolatedPosRot(out Vector3 pos, out Quaternion rot)
Parameters
posVector3rotQuaternion
Returns
GetInterpolatedPosRot(out Vector3, out Quaternion, InterpolationSource)
public bool GetInterpolatedPosRot(out Vector3 pos, out Quaternion rot, InterpolationSource interpolationSource)
Parameters
posVector3rotQuaternioninterpolationSourceInterpolationSource
Returns
InternalGetStateSizeWords()
public override int InternalGetStateSizeWords()
Returns
InternalReset()
public override void InternalReset()
NetcodeIntoGameEngine()
public override void NetcodeIntoGameEngine()
NetworkDestroy()
Called when this behaviour has been removed from the simulation.
public override void NetworkDestroy()
NetworkFixedUpdate()
Called every fixed-time network step. Any changes to the networked state should happen here.
On the client, if you are the Input Source or if this Object.PredictionMode is set to Everyone, it will be called several times in one update/tick during resimulations. To check for resimulations, use [IsResimulating].
public override void NetworkFixedUpdate()
NetworkRender()
Called every frame. Executed after NetworkUpdate and NetworkFixedUpdate.
public override void NetworkRender()
NetworkStart()
Called when this behaviour has been added to the simulation.
public override void NetworkStart()
OnBecameInterested()
Called in the client when the client becomes interested in this object.
public override void OnBecameInterested()
Teleport(Quaternion)
Instantly moves the object. By calling this method, the object won't be interpolated for one tick.
public void Teleport(Quaternion rotation)
Parameters
rotationQuaternion
Teleport(Vector3)
Instantly moves the object. By calling this method, the object won't be interpolated for one tick.
public void Teleport(Vector3 position)
Parameters
positionVector3
Teleport(Vector3, Quaternion)
Instantly moves the object. By calling this method, the object won't be interpolated for one tick.
public void Teleport(Vector3 position, Quaternion rotation)
Parameters
positionVector3rotationQuaternion