Exemple #1
0
    public Vector3 GetMoveThrottle()
    {
        if (this == null || this.gameObject == null)
        {
            return(Vector3.zero);
        }

        if (voosActor != null && voosActor.IsLocallyOwned())
        {
            return(voosActor.GetDesiredVelocity());
        }
        else
        {
            // TEMP TEMP - can be noisy, thus the thresholding.
            var groundVel = inferredVelocity.WithY(0f);
            return(groundVel.magnitude > 0.4f ? groundVel : Vector3.zero);
        }
    }
 public Vector3 GetMoveThrottle()
 {
     return(Quaternion.Inverse(actor.GetRotation()) * actor.GetDesiredVelocity());
 }