C# Класс 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.
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

OnDestroy() публичный Метод

Called when object is destroyed i.e. when game ends
public OnDestroy ( ) : void
Результат void

SetServerScreenSize() публичный Метод

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
Результат void

Start() публичный Метод

Called after Gameobject is initalized. We start listening for pose data
public Start ( ) : void
Результат void

Update() публичный Метод

Called every frame and interpolates the current pose to the synchronized pose based on time.
public Update ( ) : void
Результат void