How do I stretch a Sprite to 100%?

Get help using Construct 2

Post » Tue May 17, 2016 9:34 pm

So I messing around with 100% width on sprites and no matter what I try, doesn't come out as expected. So I created a sprite and set its width to ViewportRight(0) expecting it to "stretch" from the left side to the right, but it only goes about halfway.

I tested by setting the position or ViewportRight(0) and the sprite snaps to the right edge. Why wont it "stretch" 100%? thanks
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Tue May 17, 2016 10:09 pm

Image

let's say ViewportRight(0)=500 px so you have Sprite set width to 500 px
now..how you steach a Sprite .. depends on the origin point position

In the center:
Image
Image

on one side:
Image
Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue May 17, 2016 10:13 pm

YOUR KIDDING ME!!!!!! Ahhhh been killing myself over this and it was origin point based, man what a nightmare. Just tweak the code and the Origin point and TADA! works like I expect. Wow thank you, feel stupid. Thanks!
B
21
S
7
G
1
Posts: 128
Reputation: 3,076


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests