Hello, since the movement is always executed on the server, on the client I have disabled all the AIPath, RVOController, etc. components. Since the client has all these components disabled, how can I calculate NormalizedSpeed in the client without having to calculate it on the server and send this value over the network?
//SERVER:
// Calculate the velocity relative to this transform’s orientation
Vector3 relVelocity = transform.InverseTransformDirection(this.MiAIPath.velocity);
relVelocity.y = 0;
// Speed relative to the character size
float vVelAnterior = this.Animator.GetFloat(“NormalizedSpeed”);
float vVelActual = relVelocity.magnitude / this.Animator.transform.lossyScale.x;
//CLIENT???
Taking advantage of the same post to not create more, I need to know how I can follow another agent all the time without the speed decreasing every time the route is recalculated, currently I do this continuously:
if (MiSeeker.IsDone())
{
this.MyAIDestinationSetter.target.position = this.TargetAgent.transform.position;
this.MyAIPath.destination = this.MyAIDestinationSetter.target.position;
this.MiAIPath.SearchPath();
}