protected override SteeringOutput GetSteering()
        {
            SteeringOutput result = WanderAroundPlusAvoid.GetSteering(m_ownKS, m_seekWeight, ref m_wanderInfo, m_obstacleAvoidanceInfo, m_seekInfo, ref obstacleAvoided);

            base.ApplyFacingPolicy(obstacleAvoided ? m_obstacleAvoidanceInfo.m_facingPolicy : m_wanderInfo.m_facingPolicy, result);

            return(result);
        }
예제 #2
0
        public override SteeringOutput GetSteering()
        {
            // no KS? get it
            if (this.ownKS == null)
            {
                this.ownKS = GetComponent <KinematicState>();
            }

            SteeringOutput result = WanderAroundPlusAvoid.GetSteering(ownKS, attractor, seekWeight, wanderRate, wanderRadius, wanderOffset,
                                                                      ref targetOrientation, showWhisker, lookAheadLength, avoidDistance,
                                                                      secondaryWhiskerAngle, secondaryWhiskerRatio, ref avoidActive);

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