예제 #1
0
        public override void OnEnter()
        {
            gesture = GestureUtils.GetGesture<Gesture>(Fsm, GameObject, Gesture, Component, false);
            if (gesture == null)
            {
                LogError("Gesture is missing");
                return;
            }

            ITouchHit hit;
            gesture.GetTargetHitResult(out hit);
            var hit3d = hit as ITouchHit3D;
            if (hit3d == null) return;

            if (Collider != null) Collider.Value = hit3d.Collider;
            if (RigidBody != null) RigidBody.Value = hit3d.Rigidbody;
            if (Normal != null) Normal.Value = hit3d.Normal;
            if (Point != null) Point.Value = hit3d.Point;

            Finish();
        }