I mean, it works, just not very nice π looking into tidying it
14 Jan 2016, 17:03
Ok, so I passed in a list through the mix and apply functions. And it seems to be triggering events twice.
I put a break point on the Event time line, where it adds the event to the fired event list, and I saw it was adding events. I looked at the variables to see why it would add it more than once, it seems that the last time var, is screwed up and can end up lower than the time before it. (first time it is added last time may be 1, the next time last time can be 0.8)
any ideas?
18 Jan 2016, 10:45
Confirmed events just don't work on mecanim
Well, kinda. you can see from the image bellow lastTime
has gone backwards from the previous frame, this caused events to be triggered multiple times.
Loading Image
Logging~
is a debug inside the eventTimeLine
where the events get added to the fired event list, the first number is thelast time
, and the second number is the current time
. The other debug log is the event being triggered on my side (this happened twice, I cropped the other one out by mistake).
I suspect it is because you are doing the following to calculate last time
Mathf.Max(0, time - deltaTime)
Rather than storing the last time, from the time you pass in as time