If you move the camera and hexes start moving the Dwarf does not move with the hex.
Just add a check into the UnitView a check if the animation is playing.
void Update()
{
if (inMotion)
{
this.transform.position = Vector3.SmoothDamp(this.transform.position, newPosition, ref currentVelocity, smoothTime);
// TODO: Figure out the best way to determine the end of our animation
if (Vector3.Distance(this.transform.position, newPosition) < 0.1f)
{
GameObject.FindObjectOfType<HexMap>().AnimationIsPlaying = false;
inMotion = false;
}
}
}
If you move the camera and hexes start moving the Dwarf does not move with the hex.
Just add a check into the UnitView a check if the animation is playing.