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

    Feature Request: Direction Wheel for Apply Force

    Scheduled Pinned Locked Moved
    Comments & Feedback
    4
    16
    402
    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
      last edited by

      A few other objects have direction wheels.

      Apply Force has the multiplier, which seems ready to go with a direction.

      And I suck at calculating direction based on X and Y values and getting the vector right as a result.

      Plus it means more spaghetti.

      And a bonus... extra special request... direction of force switch that turns on following the rotation of the force's host. Kind of like how particles can be set to follow the rotation of their host.

      So, if you imagine

      (the seminal game of 1980), you only need to turn the ship, any applied force is always going to occur in the right direction with this switch on.

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

        @Deeeds You could try use propel object if you want an object to have a force applied in the direction its facing. You just have the object propel itself. Say, to propel upwards (when the object is rotated at zero), target A is the object with the y anchor changed to something like 45%, and target B is the same object with the anchor left default.

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

          @Aidan-Oxley Not nearly the same.

          Not what I'm asking.

          Not the desired result.

          How does one calculate the force to be applied in any given direction?

          eg: direction = 243 degrees

          If zero degrees is up and north (I'm assuming that's how hyperPad does things... could be wrong, it might be up)

          And the force for 0 degrees is x= 0 and y= 100

          How does one rotate that force to 243 degrees?

          I do NOT know maths.

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

            @Deeeds X force = diagonal force × cos(angle)
            Y force = diagonal force × sin(angle)
            This is assuming that 0° is to the right, 90° is up, 180° is left, 270° is down (conventional angles). But hyperPad angles don’t work like that. @Hamed do you think that the angle system could be changed a little to at least make anticlockwise positive? Just to make working with trig formulas easier?

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

              @Aidan-Oxley unfortunately this was a design choice early on. Does adding 90 degrees then multiplying by one not work?

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

                @Aidan-Oxley Yes! I was already having trouble before realising up was 0. I'm also used to 0 being right. Most of the time. I think. Or something like that.

                So how do you calculate in this space?

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

                  @Hamed It’s fine, it’s still possible to do everything, just needs some more maths. How come you chose clockwise as positive though? To work completely with physics formulas, I have to reverse the direction and then add or subtract by 90° (I keep forgetting exactly how I do this, but I have done it).

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

                    @Deeeds You can get it to work by having 90 - object angle. Everything will work fine even though the numbers you get might look completely wrong. Getting the angle values to actually look right as text isn’t that easy.

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

                      @Aidan-Oxley Sorry, talk to me like I don't know what you're talking about.

                      Step through the process, please. I really don't know what you mean.

                      Where do I do the 90 reduction?

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

                        @Deeeds Add a Get Rotation behaviour and select your object. Add a Subtract Values behaviour, in the top part put in 90 and in the bottom part put in the output of Get Rotation. Now you can use this result instead of object rotation with the other formulas I said earlier to get an angled force 🙂

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

                          @Aidan-Oxley Cheers. I'll try. Math. My eyes glaze over and my hand reaches for a shot of whiskey every.single.time

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

                            @Deeeds MAAAAATHS!!! 😍😍😍😍 🤪

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

                              @Aidan-Oxley 👍🤣🤣

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

                                @Aidan-Oxley What is diagonal force?

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

                                  @Aidan-Oxley I put in what I'd call the "desired parallel force" since it's the amount along any one axis that I like... and that worked. Which is 10, in my case.

                                  Does this mean that if you want something to move at 45 degrees at the same rate you'd like at one of the parallels, that you do this:

                                  X travel desired force: x=10, y=0
                                  Y travel desired force: x=0, y=10

                                  And therefore diagonal is x=10, y=10 ?

                                  I'd have thought it would be:

                                  x=5, y=5

                                  And that this would be called the diagonal force of x, and the diagonal force of y...

                                  Oh wait. I think I figured it out.

                                  Diagonal force is the combined force of X and Y to get the desired result???

                                  Right?

                                  I have no idea.

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

                                    @Aidan-Oxley @Hamed

                                    THANK YOU BOTH!!

                                    This is now working. I have objects I can rotate and they apply force correctly.

                                    Feature request still stands! It would be awesome if this guff could be abstracted away to where it belongs, in the dustbin with the casio calculator watches of the 1980's.

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