質問内容
タイトル通りですがキャラクターの手に指を曲げて武器を手にがっしりもさせたいのですがこれを実装するにはどうしたらいいのでしょうか?
IKを使い手に武器を持たせたり、手の子のオブジェクトに持たせるなどして手に持たせることは実装出来たのですが。指を曲げて持たせるという動作が作れません
知りたいこと
武器毎にキャラクターに指を曲げて武器を持たせる方法が知りたい
試した事
IKを使い手に武器を持たせる
参考サイト
https://gametukurikata.com/operation/exactlyweapon
cs
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4 5public class LeftWeaponIK : MonoBehaviour 6{ 7 8 [SerializeField] private Transform leftHandTransform; 9 private Animator animator; 10 11 12 public float weight = 0.5f; 13 14 // Start is called before the first frame update 15 void Start() 16 { 17 animator = GetComponent<Animator>(); 18 //Debug.Log(animator); 19 } 20 21 private void Update() 22 { 23 24 } 25 26 private void OnAnimatorIK() 27 { 28 animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, weight); 29 animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, weight); 30 animator.SetIKPosition(AvatarIKGoal.LeftHand, leftHandTransform.position); 31 animator.SetIKRotation(AvatarIKGoal.LeftHand, leftHandTransform.rotation); 32 33 } 34} 35

回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2023/06/04 04:27
2023/06/04 05:24
2023/06/05 08:24 編集