@koyu2 Regarding the question in the screenshot:
"Is this what TrackTime is?"
No. The play-head at frame 35 is more related to TrackEntry.AnimationTime
, however it may increase past the end on non-looping animations.
TrackTime is described here:
https://esotericsoftware.com/spine-api-reference#TrackEntry-trackTime
"Current time in seconds this track entry has been the current track entry. The track time determines animationTime."
In other words, TrackTime
is relative to TrackEntry.AnimationStart
.
TrackTime
is ever increasing, relative to AnimationStart
and together with loop
(and AnimationEnd
if looping) it determines whether the result AnimationTime
timepoint is inside your animation, or uses AnimationEnd
as last frame when not looping and exceeding the animation duration.
koyu2 ◆Question1
TrackTimeはLoop = trueでも増え続けていませんか?
Doesn't TrackTime keep increasing even with Loop = true?
Yes, TrackTime
is ever increasing. See the documentation description: "Current time in seconds this track entry has been the current track entry."
koyu2 はい。設定しています。しかしfalseになるのは30-95Fのループを解除する命令を呼び出した時です。
上記の画像のように最初のSetAnimationはLoop=trueで呼び出されており、30-95Fをループしています
I'm afraid machine translation failed to translate this part of the question properly, unfortunately I don't understand this part. If the question is still unresolved, could you please describe this again in more detail or other words?
koyu2 ◆Question2
TrackTime = 0 == AnimationStartですか?
Yes, see the referenced documentation above.
koyu2 元々のアニメの95Fからアニメを再開したい場合、restartは65Fを指定するか、
AnimationStartを0に戻した上でrestartは95Fに指定する必要があるように見えます
If you want to restart the anime from 95F of the original anime, specify 65F for restart, or
It looks like you need to set AnimationStart back to 0 and then specify restart to 95F.
See above. You may also want to check out the code of AnimationTime
here, likely code is easier to read than prose text.
koyu2 Question3
AnimationEndが変更された時点でTrackTimeは適用されますか?
単にループ終端を変更するだけで現在再生中のアニメの描画フレームは変更されないと思っていましたがそうではないようです。
Is TrackTime applied once AnimationEnd is changed?
I thought that simply changing the end of the loop would not change the drawing frame of the currently playing anime, but that doesn't seem to be the case.
TrackTime
remains the same if Time.Scale
is 0, it adds 0 to TrackTime every frame. However, as long as the SkeletonAnimation
component is updated normally, the resulting AnimationTime
will be evaluated, leading to a different result if you change parameters like loop
, AnimationStart
, etc.
もしそうであれば、Loop = trueでもTrackTimeが増え続けるのは問題を起こします。
If so, it would be a problem if TrackTime keeps increasing even when Loop = true.
It is not increasing with Time.Scale = 0
since 0 is added each frame, it however remains e.g. 12.3
if it exceeded the animation end before and was 12.3 when setting Time.Scale = 0
.