using UnityEngine;
using System.Collections;
public class Move : MonoBehaviour
{
Animator a;
public Transform zuo;//事先放好左手位置及角度
public Transform you;//事先放好右手位置及角度
void Start()
{
a = GetComponent<Animator>();
{
a.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
a.SetIKPosition(AvatarIKGoal.LeftHand, zuo.position);
a.SetIKRotationWeight(AvatarIKGoal.LeftHand, 1);
a.SetIKRotation(AvatarIKGoal.LeftHand, zuo.rotation);
a.SetIKPositionWeight(AvatarIKGoal.RightHand, 1);
a.SetIKPosition(AvatarIKGoal.RightHand, you.position);
a.SetIKRotationWeight(AvatarIKGoal.RightHand, 1);
a.SetIKRotation(AvatarIKGoal.RightHand, you.rotation);
}
using System.Collections;
public class Move : MonoBehaviour
{
Animator a;
public Transform zuo;//事先放好左手位置及角度
public Transform you;//事先放好右手位置及角度
void Start()
{
a = GetComponent<Animator>();
}
{
a.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
a.SetIKPosition(AvatarIKGoal.LeftHand, zuo.position);
a.SetIKRotationWeight(AvatarIKGoal.LeftHand, 1);
a.SetIKRotation(AvatarIKGoal.LeftHand, zuo.rotation);
a.SetIKPositionWeight(AvatarIKGoal.RightHand, 1);
a.SetIKPosition(AvatarIKGoal.RightHand, you.position);
a.SetIKRotationWeight(AvatarIKGoal.RightHand, 1);
a.SetIKRotation(AvatarIKGoal.RightHand, you.rotation);
}