My Project
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SmoothState Class Reference

The state of an object: timestamp, position, rotation, scale, velocity, angular velocity. More...

Public Member Functions

 SmoothState ()
 Default constructor. Does nothing.
 
SmoothState copyFromState (SmoothState state)
 Copy an existing State.
 
void resetTheVariables ()
 
void copyFromSmoothSync (SmoothSync smoothSyncScript)
 

Static Public Member Functions

static SmoothState Lerp (SmoothState targetTempState, SmoothState start, SmoothState end, float t)
 Returns a Lerped state that is between two States in time.
 

Public Attributes

float ownerTimestamp
 The network timestamp of the owner when the state was sent.
 
Vector3 position
 The position of the owned object when the state was sent.
 
Quaternion rotation
 The rotation of the owned object when the state was sent.
 
Vector3 scale
 The scale of the owned object when the state was sent.
 
Vector3 velocity
 The velocity of the owned object when the state was sent.
 
Vector3 angularVelocity
 The angularVelocity of the owned object when the state was sent.
 
bool teleport
 If this State is tagged as a teleport State, it should be moved immediately to instead of lerped to.
 
bool atPositionalRest
 If this State is tagged as a positional rest State, it should stop extrapolating position on non-owners.
 
bool atRotationalRest
 If this State is tagged as a rotational rest State, it should stop extrapolating rotation on non-owners.
 
float receivedOnServerTimestamp
 The time on the server when the State is validated. Only used by server for latestVerifiedState.
 
Vector3 reusableRotationVector
 Used in Deserialize() so we don't have to make a new Vector3 every time.
 
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.
 
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.
 
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.
 
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.
 
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.
 
bool serverShouldRelayTeleport = false
 The server will set this to true if it is received so we know to relay the information back out to other clients.
 

Detailed Description

The state of an object: timestamp, position, rotation, scale, velocity, angular velocity.

Member Function Documentation

◆ Lerp()

static SmoothState SmoothState.Lerp ( SmoothState  targetTempState,
SmoothState  start,
SmoothState  end,
float  t 
)
inlinestatic

Returns a Lerped state that is between two States in time.

Parameters
startStart State
endEnd State
tTime
Returns

The documentation for this class was generated from the following file: