繼上篇 實作跳過障礙物 找到一個新思路.
- 用 Timeline 來進行 Humanoid 的跳躍
- Preview 可以很人性化的看到人物是怎樣經過的
- 把錄制的 Timeline 裡的障礙物當作錨點 (Anchor) 在可容許的範圍內進行動態修正.
- 修正落點的高度,
洐生問題,
修正整個 Timeline 的 offset 在官方的 Help 文檔中沒有清楚的標示.
如需要取得 AnimationPlayerableAsset
它會以 Object Type 來回傳, 並且隱藏於 TimeLineClip.asset 之中.
假設已經取得 TrackAsset 的情況下利用這方式取得.
public IEnumerable<AnimationPlayableAsset> GetAnimationPlayableAssets(TrackAsset track) { foreach (var clip in track.GetClips()) { AnimationPlayableAsset ani = (AnimationPlayableAsset)clip.asset; if (ani != null) yield return ani; } }
at the end, I was using timeline to implement my jump feature.
– pre-calculate the landing point
– and allow small range correction, (major on rotation + Y-axis height)
– use the timeline’s path as data source,
feeding delta position, rotation into my character controller.
Pingback: Solution for Animator become uninitialized, after SetGenericBinding()-> and removed from timeline. – Clonefactor
Hey, man I don’t know if you still active but would love to have a conversation with you on this approach