How do I squash and stretch a sprite with a tween?

Get help using Construct 2

Post » Mon Dec 14, 2015 7:37 pm

But the catch is, I want the sprite to stay on the ground, when I use any of the tween behaviors to adjust the height/scale, the sprite shrinks from the bottom and top, so it gets lower from the top and higher from the bottom, I want it to stay in place and shrink from the top towards the centre and back again.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Dec 14, 2015 7:45 pm

The location of the origin determines from where a sprite stretches or shrinks, so placing it at the bottom of your sprite should make it squash and stretch the way you're wanting. Otherwise, you'll have to adjust the sprite's position based on the current amount of squash or stretch.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » Mon Dec 14, 2015 8:58 pm

I've tried repositioning the sprite to counter the origin, but I can't get the position to move with any of the tween behaviors since I'm pinning my sprite to a container. I was hoping the positioning would happen post- the pin.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Dec 14, 2015 9:13 pm

Zebbi wrote:I've tried repositioning the sprite to counter the origin, but I can't get the position to move with any of the tween behaviors since I'm pinning my sprite to a container. I was hoping the positioning would happen post- the pin.


So change the origin of your sprite, which is the preferred way, anyway..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 14, 2015 10:23 pm

Thanks, works well like that.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253


Return to How do I....?

Who is online

Users browsing this forum: HenryPK, mehrshadfarahani, NadeemAbbass, plinkie, Yahoo [Bot] and 9 guests