mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-03 13:30:25 +07:00
Fixed units not rotating to target
This commit is contained in:
parent
9c7b80f066
commit
7527f9326c
@ -14,7 +14,7 @@ import static io.anuke.mindustry.Vars.groundEffectGroup;
|
||||
* Class for creating block rubble on the ground.
|
||||
*/
|
||||
public abstract class Decal extends TimedEntity implements BelowLiquidTrait, DrawTrait{
|
||||
private static final Color color = Color.valueOf("2c2928");
|
||||
private static final Color color = Color.valueOf("3a3635");
|
||||
|
||||
@Override
|
||||
public float lifetime(){
|
||||
|
@ -265,7 +265,9 @@ public abstract class GroundUnit extends BaseUnit{
|
||||
float angle = angleTo(targetTile);
|
||||
|
||||
velocity.add(vec.trns(angleTo(targetTile), type.speed*Time.delta()));
|
||||
rotation = Mathf.slerpDelta(rotation, angle, type.rotatespeed);
|
||||
if(Units.invalidateTarget(target, this)){
|
||||
rotation = Mathf.slerpDelta(rotation, angle, type.rotatespeed);
|
||||
}
|
||||
}
|
||||
|
||||
protected void moveAwayFromCore(){
|
||||
|
Loading…
Reference in New Issue
Block a user