public DynamicVelocityMatch(Kinematic character, Kinematic target, float maxAcceleration,
                             float timeToTarget)
 {
     this.character       = character;
     this.target          = target;
     this.maxAcceleration = maxAcceleration;
     this.timeToTarget    = timeToTarget;
 }
        public void Apply(Kinematic kinematic, bool lookWhereYoureGoing, float maxSpeed, float deltaTime)
        {
            //kinematic.UpdatePositionAndOrientation(deltaTime);

            kinematic.velocity += linear * deltaTime;
            kinematic.rotation += angular * deltaTime;

            kinematic.AdjustParameters(lookWhereYoureGoing, maxSpeed);
        }
Exemple #3
0
 public DynamicAlign(Kinematic character, Kinematic target, float maxRotation,
                     float maxAngularAcceleration, float targetRadius, float slowRadius, float timeToTarget)
 {
     this.character              = character;
     this.target                 = target;
     this.maxRotation            = maxRotation;
     this.maxAngularAcceleration = maxAngularAcceleration;
     this.targetRadius           = targetRadius;
     this.slowRadius             = slowRadius;
     this.timeToTarget           = timeToTarget;
 }
Exemple #4
0
 public DynamicArrive(Kinematic character, Kinematic target, float maxAcceleration, float maxSpeed,
                      float targetRadius, float slowRadius, float timeToTarget)
 {
     this.character       = character;
     this.target          = target;
     this.maxAcceleration = maxAcceleration;
     this.maxSpeed        = maxSpeed;
     this.targetRadius    = targetRadius;
     this.slowRadius      = slowRadius;
     this.timeToTarget    = timeToTarget;
 }
Exemple #5
0
 public DynamicFlee(Kinematic character, Kinematic target, float maxAcceleration)
 {
     this.character       = character;
     this.target          = target;
     this.maxAcceleration = maxAcceleration;
 }
Exemple #6
0
 public KinematicWander(Kinematic character, float maxSpeed, float maxRotation)
 {
     this.character   = character;
     this.maxSpeed    = maxSpeed;
     this.maxRotation = maxRotation;
 }