[BUG?] MoveTowards timeout

DankP3

Active member
UCC 2.2.3, Unity 2019.4

Marking as a 'bug', whilst the code is functioning correctly, i would not expect this as the desired outcome.

Line 266 of MoveTowards is:
if (m_CharacterLocomotion.Velocity.sqrMagnitude == 0 && m_CharacterLocomotion.Torque.eulerAngles.sqrMagnitude == 0) {

This is the timeout code.
On obstruction of the path to the MoveTowardsLocation you can achieve "velocity" values of the range E-12 (for example with the character walking towards a wall in full animation, but with no perceptible movement. Since this value != 0 the timeout is not triggered.

In these tests the torque did seem to be 0, it was the velocity value that was never reached, but this is also a float compared to a precise value?

As an aside, am i correct in thinking MoveTowards can use pathfinding now?
 
Top