AnimNotify TriggerTimeOffset at 0

Hello,

We are seeing an issue where two anim notifies were being applied out of track order despite both starting at time 0. Upon further investigation, I discovered they had different TriggerTimeOffsets, where one was 0.0001 and one was -0.0001, and therefore the one with the negative TriggerTimeOffset was sorted first regardless of track.

Upon further investigation, it would appear setting the TriggerTimeOffset of the Start handle inside OnMouseMove will set OffsetAfter as long as the NodePositionX is almost 0, but if you drag it all the way to 0 such that NodePositionX and MarkerSnap are both 0, you then get OffsetBefore, which seems incorrect. That will offset to starting before 0, which is not consistent with the behavior in OnDragged, and also causes anim notifies to appear identical, but potentially trigger in an order that is not expected depending on how close to 0 you dragged the start marker.

To fix this, I switched the ‘<’ to a ‘<=’, which makes SAnimNotifyPanel line 1872 to be:

EAnimEventTriggerOffsets::Type Offset = (MarkerSnap <= NodePositionX) ? EAnimEventTriggerOffsets::OffsetAfter : EAnimEventTriggerOffsets::OffsetBefore;

This has fixed it so that snapping to 0 gives a consistent result of OffsetAfter. Besides mentioning the inconsistency in the behavior, I wanted to double check that OffsetAfter (and therefore 0.0001 as the TriggerTimeOffset) is the desired behavior when snapping to 0, and that this change is the preferable way to ensure that result.

Thanks!
Bobby