‚Äč
EdgeMultiplay.Observable Class Reference

Public Member Functions

 Observable (Transform targetTransform, SyncOptions syncOption, bool interpolatePosition, bool interpolateRotation, float interpolationFactor, int observableIndex=0)
 Observable Constructor More...
 
 Observable (Transform targetTransform, SyncOptions syncOption, bool interpolatePosition, bool interpolateRotation, float interpolationFactor)
 Observable Constructor More...
 
void SetObservableIndex (int index)
 Updates the observable index in owner.observer observables list More...
 
void SetupObservable (NetworkedPlayer observableOwner)
 
void SendDataToServer ()
 
void SetOwnership (string ownerId)
 
void ChangeOwnership (string newOwnerId)
 Changes the owner of an Observable object More...
 

Public Attributes

Transform observeredTransform
 The Transform you want to Sync its position and/or rotation More...
 
SyncOptions syncOption
 Synchronization Option More...
 
bool InterpolatePosition
 Set to true if you want to smoothen the tracked position if you have network lag More...
 
bool InterpolateRotation
 Set to true if you want to smoothen the tracked rotation if you have network lag More...
 
float InterpolationFactor
 Set Interpolation factor between 0.1 and 1 More...
 
int observableIndex
 Represents the observable index in the owner.observer observables list More...
 
Vector3 lastPosition
 last recorded position More...
 
Vector3 lastRotation
 last recorded rotation euler's angles More...
 
NetworkedPlayer owner
 The player who owns the observer More...
 
bool attachedToPlayer
 wether the observable is attached to the owner tranform or not More...
 
bool squattingAllowed
 Set to true to allow ownership takeover by other players More...