I believe I bit more than I can chew, or I’m overcomplicating stuff. The guard behaviour as taught in this lesson ends up with the guards facing the wall or anyway away from the player after they return to their post, which looks kinda silly.
I tried to store their rotation at the beginning as a Quaternion, then reapplying it to the Transform in GuardBehaviour, but it doesn’t work. Any hint on what I should look at to figure it out?
private void GuardBehaviour()
{
if (transform.position != _guardPosition)
{
_mover.StartMoveAction(_guardPosition);
}
else if (transform.rotation != _guardPosDirection)
{
transform.Rotate(_guardPosDirection.eulerAngles);
}
}
So far I figured out that apparently the issue is that guards never REALLY go back to their actual original position, it’s always off by some decimal points, so the else is never triggered.