Fixed floorSpeedMultiplier being squared
This commit is contained in:
@@ -53,7 +53,7 @@ public class FormationAI extends AIController implements FormationMember{
|
||||
|
||||
Vec2 realtarget = vec.set(target).add(leader.vel);
|
||||
|
||||
float speed = unit.realSpeed() * Time.delta;
|
||||
float speed = unit.speed() * Time.delta;
|
||||
unit.approach(Mathf.arrive(unit.x, unit.y, realtarget.x, realtarget.y, unit.vel, speed, 0f, speed, 1f).scl(1f / Time.delta));
|
||||
|
||||
if(unit.canMine() && leader.canMine()){
|
||||
|
||||
@@ -121,7 +121,7 @@ public class LogicAI extends AIController{
|
||||
|
||||
float length = circleLength <= 0.001f ? 1f : Mathf.clamp((unit.dst(target) - circleLength) / smooth, -1f, 1f);
|
||||
|
||||
vec.setLength(unit.realSpeed() * length);
|
||||
vec.setLength(unit.speed() * length);
|
||||
if(length < -0.5f){
|
||||
vec.rotate(180f);
|
||||
}else if(length < 0){
|
||||
|
||||
Reference in New Issue
Block a user