Foot IK

新增腳的控制器

設定控制器和骨頭的連結

將控制器連結到Full Body IK 節點
Root : Pelvis
Effectors: foot_I, foot_r, spine_04

Bone Settings
calf_I, calf_r, pelvis
calf_I, calf_r:
Use Preferred angles: 打勾
Preferred Angles: Z:45
Pelvis:
Rotation Stiffness: 0.95
Position Stiffness: 0.95


Foot Trace 腳部軌跡
因為會重複使用,所以在這邊使用Function將節點包在一起.
創建一個 Function: Foot Trace

Foot Trace
Input add: Bone (Rig Element Key)
Output add: Trace Hit (Boolean), Trace Offset Z (Float)

將骨頭的方向位置配上Sphere Trace來判斷碰撞的情況,目前將Z軸設定為100,為了方便調整,將它變成參數變數調整,名字是FlootHitDistance,可以依據角色進行調整

為了方便更容易Debug,在這邊使用Draw line and transform來製作線條和軸相判斷

為了讓腳不跟地面穿幫,這邊在Hit Location Z 加1,為了方便調整,這邊也設定為參數變數,名字是AdditionHitOffset

最終的Foot Trace Function

將剛剛製作好的 Foot Trace Function,進行左右腳設定
先在Variables 新增變數

再將剛剛的Fucntion節點連結上
左腳

右腳

全部連在一起

在遊戲裡面,如果想要看到Control Rig Debug 線條,按下鍵盤的 ~,會出現 > 輸入的地方
再輸入的地方打上 “ a.AnimNode.ControlRig.Debug 1 “


整個專案和文件下載 / Full projects and Documents Download: https://www.patreon.com/posts/control-rig-5-2-89966351?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link
Comments