コード例 #1
0
        public void TargetIsReachableForChain_EndPointReachesTarget()
        {
            var targetPosition = new Vector2(1.0f, 2.0f);

            effectorGO.transform.position = targetPosition;

            manager.UpdateManager();

            Assert.That(126.87f, Is.EqualTo(chain.transforms[0].localRotation.eulerAngles.z).Using(floatCompare));
            Assert.That(270f, Is.EqualTo(chain.transforms[1].localRotation.eulerAngles.z).Using(floatCompare));
        }
コード例 #2
0
        public void TargetIsReachableForChain_EndPointReachesTarget()
        {
            var targetPosition = new Vector3(9.0f, 1.0f, 0.0f);

            effectorGO.transform.position = targetPosition;

            manager.UpdateManager();

            Assert.That(targetPosition, Is.EqualTo(chain.target.position).Using(vec3Compare));
            Assert.That(0.0f, Is.EqualTo((targetPosition - chain.target.position).magnitude).Using(floatCompare));
        }
コード例 #3
0
 // Update is called once per frame
 void LateUpdate()
 {
     iKManager.UpdateManager();
 }