How do I Calculate the left edge of the visible area

Get help using Construct 2

Post » Mon Sep 19, 2016 9:57 pm

I'm using scroll to to move the virtual camera around, and i'd like to figure out what the left edge of the visible area is.

The right side is simply "LayoutWidth", but what's the left side?

thanks
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Mon Sep 19, 2016 10:28 pm

ViewportBottom(layer)
ViewportLeft(layer)
ViewportRight(layer)
ViewportTop(layer)
Return the viewport boundaries in layout co-ordinates of a given layer. Not all layers have the same viewport if they are parallaxed, scaled or rotated separately.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Mon Sep 19, 2016 10:32 pm

Ah. It's the paralaxing messing things up. Is there any way to calculate the edge with paralaxing?
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Mon Sep 19, 2016 10:54 pm

ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests