void UpdateFollowingPlayer() { isFollowingPlayer = linkedPlayer.GetVelocity().sqrMagnitude != 0f; if (isFollowingPlayer) { Vector3 position = linkedPlayer.transform.position; position.z = currentPos.z; currentPos = position; } }