◆ PhotonTransformViewPositionControl()
◆ GetExtrapolatedPositionOffset()
Vector3 Photon.Pun.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
- Returns
- Estimated position of the remote object
◆ GetNetworkPosition()
Vector3 Photon.Pun.PhotonTransformViewPositionControl.GetNetworkPosition |
( |
| ) |
|
Gets the last position that was received through the network
- Returns
◆ OnPhotonSerializeView()
void Photon.Pun.PhotonTransformViewPositionControl.OnPhotonSerializeView |
( |
Vector3 |
currentPosition, |
|
|
PhotonStream |
stream, |
|
|
PhotonMessageInfo |
info |
|
) |
| |
◆ SetSynchronizedValues()
void Photon.Pun.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.
- Parameters
-
speed | The current movement vector of the object in units/second. |
turnSpeed | The current turn speed of the object in angles/second. |
◆ UpdatePosition()
Vector3 Photon.Pun.PhotonTransformViewPositionControl.UpdatePosition |
( |
Vector3 |
currentPosition | ) |
|
Calculates the new position based on the values setup in the inspector
- Parameters
-
currentPosition | The current position. |
- Returns
- The new position.
The documentation for this class was generated from the following file: