Ejemplo n.º 1
0
        public override SteeringOutput GetSteering()
        {
            // no KS? get it
            if (this.ownKS == null)
            {
                this.ownKS = GetComponent <KinematicState>();
            }

            return(Pursue.GetSteering(this.ownKS, this.target, this.maxPredictionTime));
        }
        public static SteeringOutput GetSteering(KinematicState ownKS, GameObject target, float predictionTime = 3.0f, string tag = "REPULSIVE", float repulsionTh = 8.0f)
        {
            SteeringOutput so = LinearRepulsion.GetSteering(ownKS, tag, repulsionTh);

            if (so != NULL_STEERING)
            {
                return(so);
            }

            return(Pursue.GetSteering(ownKS, target, predictionTime));
        }
Ejemplo n.º 3
0
        public override SteeringOutput GetSteering()
        {
            // no KS? get it
            if (this.ownKS == null)
            {
                this.ownKS = GetComponent <KinematicState>();
            }

            SteeringOutput result = Pursue.GetSteering(this.ownKS, this.target, this.maxPredictionTime);

            base.applyRotationalPolicy(rotationalPolicy, result, target);
            return(result);
        }