[REQUEST] Resize sprite to image point instead of origin?

  • I have a player animations Sprite that's pinned to a container and its origin is in the centre. It needs to be here for Gravity switch reasons. I want to resize the Sprite so it squashes, but I want it to squash to its feet as if the origin was at the bottom. I can't resize and counter it by repositioning the sprite because it's pinned and I can't temporarily un pin as it would be during gameplay. Is it possible for someone to come up with a behaviour that would allow resizing and defining the centre point as an image point rather than the origin?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • can you show us what exactly you want to achieve?

    P.S are you trying to achieve the old mario mushroom growth? cause you could do the resizing on original point unpin and then move as you said its not possible, but keeping in mind original old mario was pausing the gamespeed while he was growing or shrinking, and you couldn't control it while the effect was happening.

  • I would suggest getting rid of the pin behavior, and making your own with some trig.

    x+cos(angle)*distance

    y+sin(angle)*distance

    That lets you use a variable to decide where the offset container will be.

    variableo=0, set angle to n, set distance to n

    variableo=1, set angle to t, set distance to t

    You just have to figure out what those values are.

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