Public Member Functions | |
PhotonTransformViewPositionControl (PhotonTransformViewPositionModel model) | |
void | SetSynchronizedValues (Vector3 speed, float turnSpeed) |
These values are synchronized to the remote objects if the interpolation mode or the extrapolation mode SynchronizeValues is used. Your movement script should pass on the current speed (in units/second) and turning speed (in angles/second) so the remote object can use them to predict the objects movement. More... | |
Vector3 | UpdatePosition (Vector3 currentPosition) |
Calculates the new position based on the values setup in the inspector More... | |
Vector3 | GetNetworkPosition () |
Gets the last position that was received through the network More... | |
Vector3 | GetExtrapolatedPositionOffset () |
Calculates an estimated position based on the last synchronized position, the time when the last position was received and the movement speed of the object More... | |
void | OnPhotonSerializeView (Vector3 currentPosition, PhotonStream stream, PhotonMessageInfo info) |
PhotonTransformViewPositionControl.PhotonTransformViewPositionControl | ( | PhotonTransformViewPositionModel | model | ) |
Vector3 PhotonTransformViewPositionControl.GetExtrapolatedPositionOffset | ( | ) |
Calculates an estimated position based on the last synchronized position, the time when the last position was received and the movement speed of the object
Vector3 PhotonTransformViewPositionControl.GetNetworkPosition | ( | ) |
Gets the last position that was received through the network
void PhotonTransformViewPositionControl.OnPhotonSerializeView | ( | Vector3 | currentPosition, |
PhotonStream | stream, | ||
PhotonMessageInfo | info | ||
) |
void PhotonTransformViewPositionControl.SetSynchronizedValues | ( | Vector3 | speed, |
float | turnSpeed | ||
) |
These values are synchronized to the remote objects if the interpolation mode or the extrapolation mode SynchronizeValues is used. Your movement script should pass on the current speed (in units/second) and turning speed (in angles/second) so the remote object can use them to predict the objects movement.
speed | The current movement vector of the object in units/second. |
turnSpeed | The current turn speed of the object in angles/second. |
Vector3 PhotonTransformViewPositionControl.UpdatePosition | ( | Vector3 | currentPosition | ) |
Calculates the new position based on the values setup in the inspector
currentPosition | The current position. |