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

    How to rotate in a loop?

    Scheduled Pinned Locked Moved
    General Discussion
    5
    8
    458
    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.
    • John LiaoJ
      John Liao
      last edited by

      I'd like to rotate an object 5 times in a loop. I setup it as the attached pic, but just rotate once.... anywhere wrong?

      0_1502434238959_IMG_1119.PNG

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

        @John-Liao you are using a rotate to angle behavior, so unless you are rotating it to a value that changes, it will keep rotating to the same spot(it won’t rotate😄). You should use a rotate by behavior instead.
        Also, I wouldn’t use a loop....I’d just multiply the number you want to rotate by by 5 instead of looping five times.

        1 Reply Last reply Reply Quote 0
        • Aidan_FireA
          Aidan_Fire
          last edited by

          @John-Liao 1. As @iTap-Development said you are using rotate to angle which means it will rotate to that same angle, so maybe you should change it to a Rotate By behaviour. 2. You have the loop sitting at the bottom of rotate to angle, what you should have is loop sitting above it with a line drawn from the bottom of the loop to the rotate behaviour. 3. Loops will run pretty much instantly, you won't even see it rotate.

          1 Reply Last reply Reply Quote 0
          • John LiaoJ
            John Liao
            last edited by

            Thank u.
            I tried the rotate by behavior, as attached pic. However it's the same, only rotate once but not repeat 5 times in the loop.... anywhere wrong?

            0_1502522484100_IMG_1122.PNG

            Jack8680J 1 Reply Last reply Reply Quote 0
            • Jack8680J
              Jack8680 @John Liao
              last edited by

              @John-Liao what are you trying to achieve with this? A loop runs the behaviours below as fast as possible, meaning the next rotate behaviour activates before the current one finishes (it basically runs the behaviour 5 times at once). They overwrite each other due to their overlapping durations, so it will only do the last one. You could set the duration to 0, and then it will do all of them, but there's no point since it'll be instant.

              John LiaoJ 1 Reply Last reply Reply Quote 0
              • John LiaoJ
                John Liao @Jack8680
                last edited by

                @Jack8680 Thanks. I solved the problem by using the "Multiply Values" to times the index value and degree value in the loop. As following pic.
                Thanks a lot.

                0_1502546711426_IMG_1123.PNG

                D 1 Reply Last reply Reply Quote 0
                • D
                  Deeeds @John Liao
                  last edited by

                  @John-Liao Did this rotate five times as you wanted? What are the settings in your loop?

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

                    @Deeeds it rotates 5 times because it's multiplying the last value of the loop index by 5 and rotating all of that at once. I forgot to reply here back then; the loop is basically doing nothing here.

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