public void TargetVelocityChangeRequest(float targetVelocity) { if (Sync.IsServer) { TargetVelocity = targetVelocity; } SyncObject.ChangeStatorTargetVelocity(targetVelocity); }
private void SetTargetVelocity(float RPM, bool sync = true) { if (RPM != GetTargetVelocityRPM()) { var velocity = MathHelper.RPMToRadiansPerMillisec * 1000 * RPM; if (sync) { if (Sync.IsServer) { TargetVelocity = velocity; } SyncObject.ChangeStatorTargetVelocity(velocity); } else { TargetVelocity = velocity; } } }