C# Class Ball_MotionSync, goalBall

Synchronizes the position/rotating of the ball over the network
Inheritance: NetworkBehaviour
Mostra file Open project: DrexelGoalBall/goalBall

Public Properties

Property Type Description
lerpRate float
posThreshold float
velThreshold float

Public Methods

Method Description
Reset ( ) : void

Moves the ball to its intital position/rotation

Private Methods

Method Description
LerpMotion ( ) : void

On clients, lerps position/rotation of ball based on transformations provided by server

Start ( ) : void

Sets up the initial values

TransmitMotion ( ) : void

If this is the server and the ball has moved/rotated significantly, update its position/rotation

Update ( ) : void

Every frame, send or lerp position of ball depending on server or client

Method Details

Reset() public method

Moves the ball to its intital position/rotation
public Reset ( ) : void
return void

Property Details

lerpRate public_oe property

public float lerpRate
return float

posThreshold public_oe property

public float posThreshold
return float

velThreshold public_oe property

public float velThreshold
return float