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
87
S
44
G
16
Posts: 1,002
Reputation: 17,932

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
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

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
87
S
44
G
16
Posts: 1,002
Reputation: 17,932

Post » Mon Sep 19, 2016 10:54 pm

ImageImageImage
B
71
S
21
G
233
Posts: 3,696
Reputation: 130,368


Return to How do I....?

Who is online

Users browsing this forum: Badmiracle, dop2000 and 18 guests