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

    Powers

    Scheduled Pinned Locked Moved
    Help and Support
    4
    29
    1.3k
    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.
    • D
      Deeeds @iTap Development
      last edited by

      @iTap-Development This is exactly what Apple does. UIKitDynamics is invisibly attached physics objects for all their scrolling and visual responses, and even sorting collection views and a bunch of other cool stuff.

      Little known secret: A lot of people think UIKitDynamics is based off Box2D. It's not, it's Bullet Physics without the 3rd dimension, and customised for their purposes. Or so I'm lead to believe. Similarly, SpriteKit physics is Bullet Physics with an API made to be familiar to users of Box2D.

      In SceneKit, it's back to full 3D Bullet Physics.

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

        @Murtaza is this how UI elements(specifically scrolling) will work when you add them?
        @Deeeds I'm not saying you are wrong, it just seems weird and kinda tacky way to do it🤷‍♂️

        D 1 Reply Last reply Reply Quote 0
        • D
          Deeeds @iTap Development
          last edited by

          @iTap-Development Me? Wrong?

          Com'on now. Who do you think you're talking with?

          Don't believe me. There's no need:

          Watch the video: https://developer.apple.com/videos/play/wwdc2015/229/

          And read for yourself:

          https://developer.apple.com/documentation/uikit/animation_and_haptics/uikit_dynamics

          iTap DevelopmentI 2 Replies Last reply Reply Quote 0
          • Aidan_FireA
            Aidan_Fire @iTap Development
            last edited by

            @iTap-Development If your power is always staying the same, just multiply the two values together, then again and again until you reach your power. But if your power is changing during the project being run, yeah you’d use a loop or something. You know what else I’d like? More options than just square root. What about cubed root etc?

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

              @Aidan-Oxley yeah the power is changing.
              Yes! Other roots would be great!

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

                @Deeeds so if I scroll through my iMessages, thats a physics object doing the animation?

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

                  @Deeeds I checked out the links, pretty cool! I might make two versions of the scroll now!

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

                    @iTap-Development (late reply) Math behaviours should be efficient enough that you can do integer powers through loops without freezing as long as you don't have them too large. It'd probably depend on what device is running, but I can calculate the 64th power of numbers through a loop in under a frame on iPad Air 2.

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

                      @Jack8680 I have iPad Pro second gen.
                      Shouldn’t be a problem at all then. Thanks!

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

                        Any suggestions for the best way to get the velocity of scrolling?

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

                          @iTap-Development What do you mean? You could use a Get Velocity behaviour?

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

                            @Aidan-Oxley I don’t think get velocity will work on objects being moved by move behaviors though, right?

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

                              @iTap-Development Oh, using Move behaviours. No it probably won’t. What you’d need to do then is divide the distance being moved by the time it’s being moved by. If your time is zero, then multiply by 60 instead of divide by time (dividing by zero is bad 😛).

                              iTap DevelopmentI 2 Replies Last reply Reply Quote 0
                              • iTap DevelopmentI
                                iTap Development @Aidan_Fire
                                last edited by

                                @Aidan-Oxley ok I’ll try that. Yeah I won’t divide by zero!

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

                                  @Aidan-Oxley is get time behavior the best way to get the time? Is it fast?

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

                                    @iTap-Development That’s not what I meant. I meant the time you have set in the Move behaviour (e.g move 0x and 7y over 4 seconds). The velocity for that example would be 7 ÷ 4 = 1.75m/s in y direction. You could do the same for x, and come up with an x velocity and a y velocity (depending on how your object is moving.

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

                                      @Aidan-Oxley oh I see! Thank you!

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