Better support for disabling omniMovement

This commit is contained in:
Anuken
2021-08-19 16:29:49 -04:00
parent dc5ca76df0
commit e23054d606
8 changed files with 47 additions and 37 deletions

View File

@@ -76,6 +76,17 @@ abstract class MechComp implements Posc, Flyingc, Hitboxc, Unitc, Mechc, Elevati
return raw;
}
@Override
@Replace
public void rotateMove(Vec2 vec){
//mechs use baseRotation to rotate, not rotation.
moveAt(Tmp.v2.trns(baseRotation, vec.len()));
if(!vec.isZero()){
baseRotation = Angles.moveToward(baseRotation, vec.angle(), type.rotateSpeed * Math.max(Time.delta, 1));
}
}
@Override
public void moveAt(Vec2 vector, float acceleration){
//mark walking state when moving in a controlled manner