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. Help and Support
  3. Enabling and Disabling Follow Screen

Enabling and Disabling Follow Screen

Scheduled Pinned Locked Moved Help and Support
7 Posts 2 Posters 1.7k 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.
  • Keith DavisZ Offline
    Keith DavisZ Offline
    Keith Davis
    wrote on last edited by ZuniSoft
    #1

    I have a scene that implements parallax backgrounds based on a timer and screen position, works nice and smooth. I have two walls to stop the user at each end of the world (the world is wider than the screen). While playing, the backgrounds show off the end of the world i.e. past the wall.

    42284E9A-2254-48CD-BBD7-269978BE0E4E.jpeg

    I have been wrestling with trying to figure out a way to stop the player at the edge of the screen without the extra backgrounds showing.

    I have been playing with screen and player positions and I am really close. If I try toggling the players follow screen behavior I can get what I want when hitting the wall without the extra background showing. The white edge is the wall.

    440E93F2-D9D0-4AE1-9ED8-648629938694.jpeg

    When I try to re-enable the follow screen behavior, the whole screen shifts… why it doesn’t hold the same screen position is baffling me. The following is what I get when I detect moving away from the wall and re-enabling the follow screen behavior.

    51997A95-5305-4DCA-AEB4-A450B9C50D54.jpeg

    What I want is while not hitting the walls is for the screen to follow the player, this works. When getting to a wall, behave like conform to screen. I can’t use conform to screen as it jacks up the view while the player is jumping. Maybe I am being dull, help!

    Aidan_FireA 1 Reply Last reply
    0
    • Keith DavisZ Keith Davis

      I have a scene that implements parallax backgrounds based on a timer and screen position, works nice and smooth. I have two walls to stop the user at each end of the world (the world is wider than the screen). While playing, the backgrounds show off the end of the world i.e. past the wall.

      42284E9A-2254-48CD-BBD7-269978BE0E4E.jpeg

      I have been wrestling with trying to figure out a way to stop the player at the edge of the screen without the extra backgrounds showing.

      I have been playing with screen and player positions and I am really close. If I try toggling the players follow screen behavior I can get what I want when hitting the wall without the extra background showing. The white edge is the wall.

      440E93F2-D9D0-4AE1-9ED8-648629938694.jpeg

      When I try to re-enable the follow screen behavior, the whole screen shifts… why it doesn’t hold the same screen position is baffling me. The following is what I get when I detect moving away from the wall and re-enabling the follow screen behavior.

      51997A95-5305-4DCA-AEB4-A450B9C50D54.jpeg

      What I want is while not hitting the walls is for the screen to follow the player, this works. When getting to a wall, behave like conform to screen. I can’t use conform to screen as it jacks up the view while the player is jumping. Maybe I am being dull, help!

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

      @krdavis The Screen Follow behaviour will follow the player based on where the player is when the behaviour starts working, I think. It’s also possible the the Screen Follow behaviour is acting strangely when disabled then re-enabled. If you want more proper control over the screen, you could try running a timer with 1÷60, that is ~0.0166666667s, not 0, and using either Screen To Object (on an anchor if you don’t want player in dead centre) or Screen To Point if you want to give the screen exact coordinates based on player coordinates.

      Keith DavisZ 1 Reply Last reply
      0
      • Aidan_FireA Aidan_Fire

        @krdavis The Screen Follow behaviour will follow the player based on where the player is when the behaviour starts working, I think. It’s also possible the the Screen Follow behaviour is acting strangely when disabled then re-enabled. If you want more proper control over the screen, you could try running a timer with 1÷60, that is ~0.0166666667s, not 0, and using either Screen To Object (on an anchor if you don’t want player in dead centre) or Screen To Point if you want to give the screen exact coordinates based on player coordinates.

        Keith DavisZ Offline
        Keith DavisZ Offline
        Keith Davis
        wrote on last edited by ZuniSoft
        #3

        @Aidan_Fire thanks for the timer pointer; however, I am still getting the screen jump when I re-enable follow screen. My screen to point is smooth and accurate. Looks like an issue with the screen follow behavior.

        Aidan_FireA 1 Reply Last reply
        0
        • Keith DavisZ Keith Davis

          @Aidan_Fire thanks for the timer pointer; however, I am still getting the screen jump when I re-enable follow screen. My screen to point is smooth and accurate. Looks like an issue with the screen follow behavior.

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

          @krdavis Odd, when I just tested out disabling and re-enabling a screen follow behaviour in a test project it behaved exactly as I would expect it to. Maybe it depends on the way you’re using it?

          Keith DavisZ 1 Reply Last reply
          0
          • Aidan_FireA Aidan_Fire

            @krdavis Odd, when I just tested out disabling and re-enabling a screen follow behaviour in a test project it behaved exactly as I would expect it to. Maybe it depends on the way you’re using it?

            Keith DavisZ Offline
            Keith DavisZ Offline
            Keith Davis
            wrote on last edited by ZuniSoft
            #5

            @Aidan_Fire my player object is moving when I make the change to enable the follow behavior. The trigger to enable is based on a calculation of the player’s position when timer fires at the interval you suggested. Can I see your test project?

            Simple question: how do I, with screen follow on, get the player to the edge of the screen and stop…

            This hiccup has been driving me nuts!

            Aidan_FireA 1 Reply Last reply
            0
            • Keith DavisZ Keith Davis

              @Aidan_Fire my player object is moving when I make the change to enable the follow behavior. The trigger to enable is based on a calculation of the player’s position when timer fires at the interval you suggested. Can I see your test project?

              Simple question: how do I, with screen follow on, get the player to the edge of the screen and stop…

              This hiccup has been driving me nuts!

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

              @krdavis Here’s an example project that I think looks like what you might be trying to do. Of course, the nearly transparent large objects should be invisible but I left them visible so you can see them in the test. I hope this helps, all behaviours are in the red square. Screen follow test.tap

              Keith DavisZ 1 Reply Last reply
              1
              • Aidan_FireA Aidan_Fire

                @krdavis Here’s an example project that I think looks like what you might be trying to do. Of course, the nearly transparent large objects should be invisible but I left them visible so you can see them in the test. I hope this helps, all behaviours are in the red square. Screen follow test.tap

                Keith DavisZ Offline
                Keith DavisZ Offline
                Keith Davis
                wrote on last edited by ZuniSoft
                #7

                @Aidan_Fire thanks so much, it was a big help! I found the source of my frustration, I had set the wrong anchor on my player and that was causing the screen jumping.

                1 Reply Last reply
                1

                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