Method SetState
SetState(Vector3?, Quaternion?, Vector3?, bool)
Directly sets a state on the authoritative transform. Owner clients can directly set the state on a server authoritative transform This will override any changes made previously to the transform This isn't resistant to network jitter. Server side changes due to this method won't be interpolated. The parameters are broken up into pos / rot / scale on purpose so that the caller can perturb just the desired one(s)
Declaration
public void SetState(Vector3? posIn = null, Quaternion? rotIn = null, Vector3? scaleIn = null, bool teleportDisabled = true)
Parameters
Type | Name | Description |
---|---|---|
Vector3? | posIn | |
Quaternion? | rotIn | |
Vector3? | scaleIn | new scale to scale to. Can be null |
bool | teleportDisabled | When true (the default) the NetworkObject will not be teleported and, if enabled, will interpolate. When false the NetworkObject will teleport/apply the parameters provided immediately. |
Exceptions
Type | Condition |
---|---|
Exception |