示例#1
0
文件: Flocking.cs 项目: fylux/GameAI
    public Steering GetSteering()
    {
        wanderOrientation += Random.Range(-1.0f, 1.0f) * wanderRate;
        wanderForce        = Wander.GetSteering(npc, wanderForce, wanderCooldown, wanderRate, wanderOrientation, wanderCircleOffset, wanderCircleRadius, maxAccel, timeToTarget, visibleRays);

        return(GetSteering(npc, groupArea, decayCoefficient, maxAccel, visibleRays, timeToTarget, wanderCooldown, wanderRate, wanderOrientation, wanderCircleOffset, wanderCircleRadius, wanderForce, cohesionPriority, separationPriority, alignmentPriority, wanderPriority));
    }
示例#2
0
    void FixedUpdate()
    {
        Vector3 accel = wander.GetSteering();

        steeringBasics.Steer(accel);
        steeringBasics.LookWhereYoureGoing();
    }
示例#3
0
文件: Flocking.cs 项目: fylux/GameAI
 public static Steering UpdateWanderForce(Agent npc, Steering wanderForce, float wanderCooldown, float wanderRate, float wanderOrientation, float wanderCircleOffset, float wanderCircleRadius, float maxAccel, float timeToTarget, bool visibleRays)
 {
     return(Wander.GetSteering(npc, wanderForce, wanderCooldown, wanderRate, wanderOrientation, wanderCircleOffset, wanderCircleRadius, maxAccel, timeToTarget, visibleRays));
 }