Fixed #5699
This commit is contained in:
@@ -645,6 +645,8 @@ public class DesktopInput extends InputHandler{
|
||||
if(omni){
|
||||
unit.moveAt(movement);
|
||||
}else{
|
||||
unit.rotateMove(movement);
|
||||
|
||||
unit.moveAt(Tmp.v2.trns(unit.rotation, movement.len()));
|
||||
|
||||
//problem: actual unit rotation is controlled by velocity, but velocity is 1) unpredictable and 2) can be set to 0
|
||||
|
||||
@@ -922,10 +922,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
if(omni){
|
||||
unit.moveAt(movement);
|
||||
}else{
|
||||
unit.moveAt(Tmp.v2.trns(unit.rotation, movement.len()));
|
||||
if(!movement.isZero()){
|
||||
unit.rotation = Angles.moveToward(unit.rotation, movement.angle(), unit.type.rotateSpeed * Math.max(Time.delta, 1));
|
||||
}
|
||||
unit.rotateMove(movement);
|
||||
}
|
||||
|
||||
//update shooting if not building + not mining
|
||||
|
||||
Reference in New Issue
Block a user