Пример #1
0
        private IEnumerator C_DismountAnim()
        {
            var DismountPos = Vector3.ProjectOnPlane(MountTrigger.transform.position - transform.position, Vector3.up).normalized;

            DismountPos  *= DismountOffset.x;
            DismountPos.y = DismountOffset.y;

            Debug.DrawRay(transform.position, DismountPos, Color.yellow, 1);

            yield return(MTools.AlignTransform_Position(transform, transform.position + DismountPos, MountTime, DismountAnim));

            End_Dismounting();
            MainCollider.enabled = true;
        }