The state of an object: timestamp, position, rotation, scale, velocity, angular velocity. More...
Public Member Functions | |
| void | copyFromSmoothSync (SmoothSync smoothSyncScript) |
| State | copyFromState (State state) |
| Copy an existing State. More... | |
| void | resetTheVariables () |
| State () | |
| Default constructor. Does nothing. More... | |
Static Public Member Functions | |
| static State | Lerp (State targetTempState, State start, State end, float t) |
| Returns a Lerped state that is between two States in time. More... | |
Public Attributes | |
| Vector3 | angularVelocity |
| The angularVelocity of the owned object when the state was sent. More... | |
| bool | atPositionalRest |
| If this State is tagged as a positional rest State, it should stop extrapolating position on non-owners. More... | |
| bool | atRotationalRest |
| If this State is tagged as a rotational rest State, it should stop extrapolating rotation on non-owners. More... | |
| float | ownerTimestamp |
| The network timestamp of the owner when the state was sent. More... | |
| Vector3 | position |
| The position of the owned object when the state was sent. More... | |
| float | receivedOnServerTimestamp |
| The time on the server when the State is validated. Only used by server for latestVerifiedState. More... | |
| Vector3 | reusableRotationVector |
| Used in Deserialize() so we don't have to make a new Vector3 every time. More... | |
| Quaternion | rotation |
| The rotation of the owned object when the state was sent. More... | |
| Vector3 | scale |
| The scale of the owned object when the state was sent. More... | |
| bool | serverShouldRelayAngularVelocity = false |
| The server will set this to true if it is received so we know to relay the information back out to other clients. More... | |
| bool | serverShouldRelayPosition = false |
| The server will set this to true if it is received so we know to relay the information back out to other clients. More... | |
| bool | serverShouldRelayRotation = false |
| The server will set this to true if it is received so we know to relay the information back out to other clients. More... | |
| bool | serverShouldRelayScale = false |
| The server will set this to true if it is received so we know to relay the information back out to other clients. More... | |
| bool | serverShouldRelayVelocity = false |
| The server will set this to true if it is received so we know to relay the information back out to other clients. More... | |
| bool | teleport |
| If this State is tagged as a teleport State, it should be moved immediately to instead of lerped to. More... | |
| Vector3 | velocity |
| The velocity of the owned object when the state was sent. More... | |
The state of an object: timestamp, position, rotation, scale, velocity, angular velocity.
|
inline |
Default constructor. Does nothing.
| Vector3 Smooth.State.angularVelocity |
The angularVelocity of the owned object when the state was sent.
| bool Smooth.State.atPositionalRest |
| bool Smooth.State.atRotationalRest |
| float Smooth.State.ownerTimestamp |
The network timestamp of the owner when the state was sent.
| Vector3 Smooth.State.position |
The position of the owned object when the state was sent.
| float Smooth.State.receivedOnServerTimestamp |
The time on the server when the State is validated. Only used by server for latestVerifiedState.
| Vector3 Smooth.State.reusableRotationVector |
Used in Deserialize() so we don't have to make a new Vector3 every time.
| Quaternion Smooth.State.rotation |
The rotation of the owned object when the state was sent.
| Vector3 Smooth.State.scale |
The scale of the owned object when the state was sent.
| bool Smooth.State.serverShouldRelayAngularVelocity = false |
The server will set this to true if it is received so we know to relay the information back out to other clients.
| bool Smooth.State.serverShouldRelayPosition = false |
The server will set this to true if it is received so we know to relay the information back out to other clients.
| bool Smooth.State.serverShouldRelayRotation = false |
The server will set this to true if it is received so we know to relay the information back out to other clients.
| bool Smooth.State.serverShouldRelayScale = false |
The server will set this to true if it is received so we know to relay the information back out to other clients.
| bool Smooth.State.serverShouldRelayVelocity = false |
The server will set this to true if it is received so we know to relay the information back out to other clients.
| bool Smooth.State.teleport |
| Vector3 Smooth.State.velocity |
The velocity of the owned object when the state was sent.