Badly needed help with this. Its a very simple problem but I am not sure where I m going wrong. Here s the case: I have an animation for a tower of defense game that I am making. It follows a path and on its path the character has to orient itself in the path direction. I have created Waypoints for determining the point of change in direction. This is what I did Code (csharp): var nextRelativeWaypointPosition : Vector3 = waypoints[currentWaypoint+1].position - transform.position; transform.LookAt(nextRelativeWaypointPosition,Vector3.up); But the Character seems to take a circular path around the target. I have tried various other functions as well using "localrotate" "InversetransformRotation" etc to no avail. Suggestions/corrections !!
This happens if you are moving the character at a constant speed (ie, the speed is constant and the angular change in direction is constant, so the character is moving in a circle). You need to slow the character down as it approaches the target point.