0 Favourites

Align to right Anchor

  • Link to .capx file (required!):

    CAPXX

    Steps to reproduce:

    1. Create 128x128px sprite, put origin at top right(128, 0)

    2. Anchor it to the top right

    3. Add sine behavior

    Observed result:

    Object grows to the right

    Expected result:

    Object grows to the left

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: NA

    Operating system & service pack:

    xp sp3, win7

    Construct 2 version:

        r132

  • Also, another related bug:

    When aligning both (left and right) anchors to the right

    What Happens:

    The object squishes.

    What should happen:

    object should ONLY be allowed ONE align, to left or right, not both.

  • Closing as not a bug. The Anchor behavior is working correctly and anchoring the left edge of the object as it has been set. If you do not want this, remake the anchor behavior in events (e.g. using the ViewportRight() expression).

  • Ashely, the Right Anchor is the problem, not the left.

    When you set a Right anchor, the object anchors to the left, not to the right. And it doesn't respect the origin point.

  • <img src="https://dl.dropboxusercontent.com/u/23009908/construct_bugs/rightanchorsinebug.gif" border="0" />

  • The object has the Origin set at the Top Right, so, Sine Size should make it grow to the left, correct?

    But the opposite happens.

    In the export, Sine makes it (wrongly) grow to the right, it doesn't respect two things: the Anchor set to right, and it also doesn't respect the Sine Size growth to the left.

    It should grow to the left.

    Hope I explained myself.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Well, the left edge is supposed to maintain the same distance from the left of the viewport, and the right edge is supposed to maintain the same distance from the right of the viewport. The sine behavior changes the size, which conflicts with what the anchor behavior is trying to do. I don't think there's an obvious thing that should happen here, so I'd recommend just using events instead of the anchor behavior.

  • Maybe it'd be good to have in SC2 the priority for these kind of behaviors. i.e. make the origin point have priority over the anchor, or the other way around.

    That way they won't conflict, because one will always have 1st priority over the other.

    Maybe this will break a couple of things in the next beta for some users, but in the long term it will be easier to maintain, and it'll be easier to spot things like these in debugging, and last but not least, the SC2 users will know what goes first when coding.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)