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

    How to move Anchor Point with code?

    Scheduled Pinned Locked Moved
    Help and Support
    4
    20
    645
    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.
    • iTap DevelopmentI
      iTap Development @Deeeds
      last edited by

      @Deeeds I think they maybe thought that the “anchor” did what you needed. Which, as far as I can tell, it doesn’t.

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

        @iTap-Development I still have no idea what they're talking about. The anchor is a specific feature of any object in a 2D or 3D space. They don't seem to be talking about the anchor.

        And yes, you've guessed right, rotation is the issue, around a point that's arbitrary, and dynamic. And gets around the snapping problem of anchor points in the editor.

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

          @Deeeds they are talking about the “anchor” that you can drag when selecting an object for a behavior. I think they thought that that anchor could be used to set the anchor for the object, but it is actually used for selecting positions for certain behaviors(and in many behaviors, It does nothing).

          I don’t know if you saw my post, but the anchor point seems to be snapping to its own grid relative to the object. So if you rotate the object, the grid gets rotated. I can see that could be useful for some things, and for others not so much. Maybe a toggle is needed?

          You could search for, or find in my posts, a thread related to making your own anchor point. It’s kinda a lot of work, but if you need an anchor bad it might help.

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

            If you can understand what’s happening in this screenshot, it shows you the only possible ways to ever change an anchor while the project is running, in a behaviour, not the anchor of the object itself.
            0_1514504323498_BE3B2FEE-103D-4350-BE63-70F97DCBB6C2.png

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

              @Aidan-Oxley oh I see what you mean. That anchor is pretty much an offset of the objects real anchor. That won’t help with rotation though.

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

                @iTap-Development If you have a Rotate By or a behaviour similar to that, and you set the anchor to something other than 50 50, it will rotate about the anchor you put in.

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

                  @Aidan-Oxley But you can't set this anchor point, for rotation, with code... right?

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

                    @Deeeds Yes, using Set Input Field. You know how that works right?
                    0_1514527083425_E4F9BDDD-56B8-4EB4-BE0D-D1CB26C30963.jpeg

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

                      @Aidan-Oxley That's not moving the anchor point, that's changing the rotation.

                      I'm asking if it's possible to move the anchor point with code.

                      Not a virtual anchor point.

                      The anchor point.

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

                        @Deeeds Yes, I’m stupid. Didn’t look at what I was doing. Erm, maybe this doesn’t work for rotations, but it does for Move to Object, or Rotate to Object.

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