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. Bug Reports
  3. Fixed
  4. Changing screen rotation breaks some physics behaviours

Changing screen rotation breaks some physics behaviours

Scheduled Pinned Locked Moved Fixed
11 Posts 4 Posters 2.5k Views 1 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.
  • Aidan_FireA Offline
    Aidan_FireA Offline
    Aidan_Fire
    wrote on last edited by
    #2

    More than just physics, this includes move behaviours with duration more than 0 and even move screen behaviours.
    https://bit.ly/3jXFK09
    Logic in red square, the result seems wrong.

    1 Reply Last reply
    0
    • Aidan_FireA Aidan_Fire

      Non beta latest version of hyperPad:
      In this example project, a red physics object with air resistance constantly propels itself forward, with a large green object in front of it. You would expect the red object to run into the green wall after a few seconds, but if you rotate the screen, the red object changes the direction it propels itself, and instead goes away from the green object when the screen rotates a full 180°.

      https://bit.ly/3hFrXJO

      bosswaveB Offline
      bosswaveB Offline
      bosswave
      wrote on last edited by
      #3

      @Aidan_Fire I noticed this as well. I’m working on a game with randomly generated levels and decided I’d set the screen rotation to a random angle during world generation and my player would not move in the correct direction.

      Hopefully this gets fixed lol

      1 Reply Last reply
      0
      • RobinsonXR Offline
        RobinsonXR Offline
        RobinsonX
        wrote on last edited by
        #4

        Wow, this is literally game breaking..

        Aidan_FireA 1 Reply Last reply
        0
        • RobinsonXR RobinsonX

          Wow, this is literally game breaking..

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

          @RobinsonX Almost. In most cases you can probably get around the problem by manually calculating anchors. I was using propel object for my Boat Racing game, instead of using propel object I'm now using sine and cosine of player angle and apply force, that still works. Just anchor based things are messed up.

          1 Reply Last reply
          1
          • HamedH Offline
            HamedH Offline
            Hamed
            Admin
            wrote on last edited by Hamed
            #6

            I see how this is a problem for Propel and the move camera behaviours. Can you guys make a list of all the behaviours that are breaking when rotating screen?

            @bosswave how are you moving your player? I tried moving an object after rotating the screen and it moved as expected?

            bosswaveB Aidan_FireA 2 Replies Last reply
            0
            • HamedH Hamed

              I see how this is a problem for Propel and the move camera behaviours. Can you guys make a list of all the behaviours that are breaking when rotating screen?

              @bosswave how are you moving your player? I tried moving an object after rotating the screen and it moved as expected?

              bosswaveB Offline
              bosswaveB Offline
              bosswave
              wrote on last edited by
              #7

              @Hamed My player consists of the main player object and a “thruster” object that’s attached to its back end. I use the thruster object to propel the main object forward.

              Aidan_FireA 1 Reply Last reply
              0
              • bosswaveB bosswave

                @Hamed My player consists of the main player object and a “thruster” object that’s attached to its back end. I use the thruster object to propel the main object forward.

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

                @bosswave Same as mine then. This still works though: instead of propel object, get player rotation, get sine and cosine of the angle, multiply these both by the force you were using on propel object, then apply force x cosine y sine.

                1 Reply Last reply
                1
                • HamedH Hamed

                  I see how this is a problem for Propel and the move camera behaviours. Can you guys make a list of all the behaviours that are breaking when rotating screen?

                  @bosswave how are you moving your player? I tried moving an object after rotating the screen and it moved as expected?

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

                  @Hamed said in Changing screen rotation breaks some physics behaviours:

                  Can you guys make a list of all the behaviours that are breaking when rotating screen?

                  -Screen moving and screen rotating at the same time over a duration other than 0 will cause the screen to end up in the wrong place

                  -Move behaviours seem to be ok

                  -Scree rotating will completely mess up propel object

                  I'll update this list if I happen to find more I guess.

                  1 Reply Last reply
                  0
                  • HamedH Offline
                    HamedH Offline
                    Hamed
                    Admin
                    wrote on last edited by
                    #10

                    Screen rotation and screen moving at the same time makes sense why it’s not working as you’d expect and I don’t think it’s something fixable.

                    The problem is that when you’re moving the screen and rotate the screen, you’re rotating it about a point. Normally that point is in the centre of the screen so it rotates about the centre. But when you’re moving the screen, your centre keeps moving.

                    If you’d manually control this through your own timer, it would recalculate the centre every frame, and not calculate the position once.

                    1 Reply Last reply
                    1
                    • HamedH Offline
                      HamedH Offline
                      Hamed
                      Admin
                      wrote on last edited by
                      #11

                      Fixed for propel objects.

                      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