C# Class NaviDevice, Navi

This class is responsible for taking the unreliable network pose data and interpolating. The interpolated data can be accessed via the DeviceLocation static variable, which is the transform of the game object this script is attached to. Supports only one device.
Inheritance: MonoBehaviour
Afficher le fichier Open project: vmohan7/Navi Class Usage Examples

Méthodes publiques

Méthode Description
OnDestroy ( ) : void

Called when object is destroyed i.e. when game ends

SetServerScreenSize ( int width, int height ) : void

Stores the smart device's width and height to be accessed by the game

Start ( ) : void

Called after Gameobject is initalized. We start listening for pose data

Update ( ) : void

Called every frame and interpolates the current pose to the synchronized pose based on time.

Private Methods

Méthode Description
OnAccelerationData ( int connectionID, Vector3 syncAccelData ) : void

Calculates the difference in time between sycnhronizations based on acceleration data sent from the network

OnPoseData ( int connectionID, Vector3 syncPosition, Quaternion syncRotation ) : void

Calculates the difference in time between sycnhronizations based on pose data sent from the network

Method Details

OnDestroy() public méthode

Called when object is destroyed i.e. when game ends
public OnDestroy ( ) : void
Résultat void

SetServerScreenSize() public méthode

Stores the smart device's width and height to be accessed by the game
public SetServerScreenSize ( int width, int height ) : void
width int The width of the smart device
height int The height of the smart device
Résultat void

Start() public méthode

Called after Gameobject is initalized. We start listening for pose data
public Start ( ) : void
Résultat void

Update() public méthode

Called every frame and interpolates the current pose to the synchronized pose based on time.
public Update ( ) : void
Résultat void