logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Tags don't work right with global touch behaviors

    Scheduled Pinned Locked Moved
    Bug Reports
    3
    9
    918
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • iTap DevelopmentI
      iTap Development
      last edited by

      If you select a tag for a global touch behavior, the touch can be triggered by touching any part of the screen that does not have an object on it. I think there should be an OPTION for blank screen to be touchable though! Also a suggestion, I think we should be able to add an identifying number or text to a touch behavior so you can tell the difference between a touch on the same object, or different objects on a tag. This would allow for much simpler pinch to zoom features and more.

      Jack8680J 1 Reply Last reply Reply Quote 0
      • Jack8680J
        Jack8680 @iTap Development
        last edited by

        @iTap-Development I'm not sure what exactly you mean, I thought tags still only applied to the objects in them. To detect how many fingers are touching a single object:

        [Started Touching(Object)]
        {
        ___[Add(Box Container+1)]
        ___[Set Box Container=Add Values]
        }

        [Stopped Touching(Object)]
        {
        ___[Subtract(Box Container-1)]
        ___[Set Box Container=Subtract Values]
        }

        The above will set how many fingers are touching. If you wanted to runs separate behaviours for the first touch of the first finger or the second finger, you could do so.

        To detect whether multiple objects being touched are different:

        [Started Touching(Tag)]
        {
        ___[Get Attribute(Tag,ID)]
        ___[Execute Sequence(Ordered)]
        ___{
        ______[Set BoxContainer1)='Get Attribute']
        ______[Set BoxContainer2)='Get Attribute']
        ___}
        ___[If(BoxContainer1=/=BoxContainer2)
        ___{
        ______If(BoxContainer2=/=0)
        ______{
        _________ //you are now touching 2 different objects
        ______}
        ___}
        }

        If, however, you want to constantly run behaviours for the first or second finger, there is no easy way to do this without having two objects that switch z-layers to detect which is being touched

        iTap DevelopmentI 1 Reply Last reply Reply Quote 0
        • iTap DevelopmentI
          iTap Development @Jack8680
          last edited by

          @Jack8680 yes tags is for the objects with that tag, but what I'm having happen is in the GLOBAL behaviors. If I select a tag in a GLOBAL touching behavior, it works for the objects with the tag as it should, but it also triggers the touch behavior if I touch any part of the screen that is not an object. What I want to be able to do with touches, is when you drag the output from the touch behavior into an input field, be able to choose if it is the coordinates of the first touch(on the selected object) or the second or third etc. what this would be useful for is pinch to zoom... all the objects you want to be able to touch for zooming you put on one tag, and then find the distance between touch 1 and 2 on the tagged objects to tell if the user is pinching and how much they are pinching.

          Jack8680J 1 Reply Last reply Reply Quote 0
          • Jack8680J
            Jack8680 @iTap Development
            last edited by

            @iTap-Development you could use multiple objects that change z layers to detect which is touching: when you touch the top one, set it's a layer behind the bottom one, so when you touch the screen with another finger it will detect the second one in a separate touch behaviour. I don't think there's a way to do it otherwise since I think each while touching only outputs a single set of values (I haven't tested it with multiple though).

            iTap DevelopmentI 1 Reply Last reply Reply Quote 0
            • iTap DevelopmentI
              iTap Development @Jack8680
              last edited by

              @Jack8680 I have a pinch to zoom mostly done with that method, but it isn't practical for a real game, I my opinion, which is why I haven't finished making it. And yes, touch behaviors have only an x and y out put, which is why I want to be able to say if it's the x or y of touch 1 2 or 3 etc on the object or tagged objects.

              Jack8680J 1 Reply Last reply Reply Quote 0
              • Jack8680J
                Jack8680 @iTap Development
                last edited by Jack8680

                @iTap-Development that would be useful. For now, my way should work, but unfortunately I ran into a bug where the stopped touching behaviour was activating multiple times due to z-layer changes. I was able to sort of work around it by subtracting 0.333 instead of 1 because the behaviour was being activated 3 times due to the bug, but the project would break when the bug gets fixed (but the project could then be fixed by changing the 0.333 to a 1). This download link will expire in 7 days: Download. I've also noticed that it seems to glitch when you use two fingers at the exact same time, it seems like it glitches when you tap both fingers in the same 60th of a second or something.
                EDIT: Lag also causes it to glitch, sometimes it detects a started touching but not the stopped touching. Especially obvious with multiple fingers.

                1 Reply Last reply Reply Quote 0
                • iTap DevelopmentI
                  iTap Development
                  last edited by

                  @Hamed I never heard from an admin if this was a bug or not so just in case you didn't see it I'm reposting it!

                  @iTap-Development said in Tags don't work right with global touch behaviors:

                  If you select a tag for a global touch behavior, the touch can be triggered by touching any part of the screen that does not have an object on it. I think there should be an OPTION for blank screen to be touchable though! Also a suggestion, I think we should be able to add an identifying number or text to a touch behavior so you can tell the difference between a touch on the same object, or different objects on a tag. This would allow for much simpler pinch to zoom features and more.

                  1 Reply Last reply Reply Quote 0
                  • HamedH
                    Hamed Admin
                    last edited by

                    Sorry for the delay... but I'm pretty sure this is fixed now (in the next beta update).

                    iTap DevelopmentI 1 Reply Last reply Reply Quote 0
                    • iTap DevelopmentI
                      iTap Development @Hamed
                      last edited by

                      @Hamed ok great!

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post