Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Comments & Feedback
  3. Feature Request: Direction Wheel for Apply Force

Feature Request: Direction Wheel for Apply Force

Scheduled Pinned Locked Moved Comments & Feedback
16 Posts 4 Posters 1.9k Views 2 Watching
  • 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 Offline
    D Offline
    Deeeds
    wrote on last edited by
    #1

    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
    0
    • D Deeeds

      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 Offline
      Aidan_FireA Offline
      Aidan_Fire
      wrote on last edited by
      #2

      @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
      0
      • Aidan_FireA Aidan_Fire

        @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 Offline
        D Offline
        Deeeds
        wrote on last edited by
        #3

        @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
        0
        • D Deeeds

          @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 Offline
          Aidan_FireA Offline
          Aidan_Fire
          wrote on last edited by
          #4

          @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
          1
          • HamedH Offline
            HamedH Offline
            Hamed
            Admin
            wrote on last edited by
            #5

            @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
            0
            • Aidan_FireA Aidan_Fire

              @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 Offline
              D Offline
              Deeeds
              wrote on last edited by
              #6

              @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
              0
              • HamedH Hamed

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

                Aidan_FireA Offline
                Aidan_FireA Offline
                Aidan_Fire
                wrote on last edited by
                #7

                @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
                0
                • D Deeeds

                  @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 Offline
                  Aidan_FireA Offline
                  Aidan_Fire
                  wrote on last edited by
                  #8

                  @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
                  0
                  • Aidan_FireA Aidan_Fire

                    @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 Offline
                    D Offline
                    Deeeds
                    wrote on last edited by
                    #9

                    @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
                    0
                    • D Deeeds

                      @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 Offline
                      Aidan_FireA Offline
                      Aidan_Fire
                      wrote on last edited by Aidan_Fire
                      #10

                      @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
                      0
                      • Aidan_FireA 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 Offline
                        D Offline
                        Deeeds
                        wrote on last edited by
                        #11

                        @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
                        0
                        • D Deeeds

                          @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 Offline
                          Aidan_FireA Offline
                          Aidan_Fire
                          wrote on last edited by Aidan_Fire
                          #12

                          @Deeeds MAAAAATHS!!! 😍😍😍😍 🤪

                          iTap DevelopmentI D 3 Replies Last reply
                          0
                          • Aidan_FireA Aidan_Fire

                            @Deeeds MAAAAATHS!!! 😍😍😍😍 🤪

                            iTap DevelopmentI Offline
                            iTap DevelopmentI Offline
                            iTap Development
                            wrote on last edited by
                            #13

                            @Aidan-Oxley 👍🤣🤣

                            1 Reply Last reply
                            0
                            • Aidan_FireA Aidan_Fire

                              @Deeeds MAAAAATHS!!! 😍😍😍😍 🤪

                              D Offline
                              D Offline
                              Deeeds
                              wrote on last edited by
                              #14

                              @Aidan-Oxley What is diagonal force?

                              1 Reply Last reply
                              0
                              • Aidan_FireA Aidan_Fire

                                @Deeeds MAAAAATHS!!! 😍😍😍😍 🤪

                                D Offline
                                D Offline
                                Deeeds
                                wrote on last edited by
                                #15

                                @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
                                0
                                • D Deeeds

                                  @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 Offline
                                  D Offline
                                  Deeeds
                                  wrote on last edited by
                                  #16

                                  @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
                                  0

                                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                  With your input, this post could be even better 💗

                                  Register Login
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Search