/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { if (_bestHidingSpot.HasValue) SteeringLibrary.Arrive(AutonomousAgent.Position, _bestHidingSpot.Value, (float) AutonomousAgent.Deceleration, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, ForceInfluence, out ComputedSteeringForce); else SteeringLibrary.Evade(AutonomousAgent.Position, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, Hunter.Position, Hunter.Velocity, Hunter.MaxSpeed, AutonomousAgent.PanicDistance, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { Matrix leaderWorldMatrix = Matrix.Identity; leaderWorldMatrix.Forward = Target.EntityForward; leaderWorldMatrix.Right = Target.EntityRight; leaderWorldMatrix.Up = Target.EntityUp; leaderWorldMatrix.Translation = Target.Position; SteeringLibrary.OffsetPursuit(AutonomousAgent.Position, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, (float) AutonomousAgent.Deceleration*AutonomousAgent.DecelerationTweaker, Target.Velocity, Target.MaxSpeed, Vector3.Transform(LocalOffset, leaderWorldMatrix), ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { //SteeringLibrary.ObstacleAvoidance(_closestObstacleLocalPosition.Value, _closestObstacle.WorldBoundingSphere.Radius, FilterDistance, ForceInfluence * Context[_closestObstacle], out ComputedSteeringForce); //var transposedInvertWorld = AutonomousAgent.ParentObject.World; //Matrix.Invert(ref transposedInvertWorld, out transposedInvertWorld); //Matrix.Transpose(ref transposedInvertWorld, out transposedInvertWorld); //Vector3.Transform(ref ComputedSteeringForce, ref transposedInvertWorld, out ComputedSteeringForce); SteeringLibrary.ObstacleAvoidanceNew(AutonomousAgent.Position, _closestObstacle.World.Translation, _closestObstacle.World.Forward, ForceInfluence * Context[_closestObstacle], out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Flee(AutonomousAgent.Position, DangerPosition.Value, AutonomousAgent.PanicDistance, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Alignment(AutonomousAgent.EntityForward, _agentForwards, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Wander(AutonomousAgent.Dice, AutonomousAgent.Position, AutonomousAgent.Velocity, AutonomousAgent.EntityForward, ref _wanderTarget, Radius, Distance, Jitter, AutonomousAgent.MaxSpeed, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Separation(AutonomousAgent.Position, _agentPositions, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Arrive(AutonomousAgent.Position, Destination.Value, (float)AutonomousAgent.Deceleration * AutonomousAgent.DecelerationTweaker, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Cohesion(AutonomousAgent.Position, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, _agentPositions, ForceInfluence, out ComputedSteeringForce); }
/// <summary> /// Computes the current Steering Behavior /// </summary> /// <returns></returns> public override void Compute() { SteeringLibrary.Seek(AutonomousAgent.Position, Destination.Value, AutonomousAgent.Velocity, AutonomousAgent.MaxSpeed, ForceInfluence, out ComputedSteeringForce); }