How do I fake parallax to limit background movement

Get help using Construct 2

Post » Thu Nov 10, 2016 8:00 pm

This has probably already been answered but I couldn't find it.

This is what I am trying to do.

I have many building. if i'm on the left side of the building a sprite behind it shows the left side as i pass in front of it it shows nothing on either side but as i reach the right it shows the right of the back sprite.

Here are some images to give an example:

Image Image Image

But i want many buildings. I tried parallax but it does not stop the image from moving in the background ( I know it was a long shot but... )

Any suggestions to fake the parallax effect? it doesn't have to be smooth either. I was thinking something like on collision or when overlapping but i'm not sure.

Thanks for your time.
B
10
S
3
G
1
Posts: 12
Reputation: 818

Post » Thu Nov 10, 2016 10:49 pm

I figured something out... not perfect at all... not even something i like ....

I added 2 sprites one before and one after the front of the building. and make the background image slide back and forth on overlapping the sprites.

ugly but works ... kinda...

Still looking forward to others offering suggestions.

Thanks.
B
10
S
3
G
1
Posts: 12
Reputation: 818

Post » Sat Nov 12, 2016 9:26 am

hmmm

I'm not well versed in this space yet, but I can tell you what I would try.

I'd make 3 sprites one for each side and the face of the building. For each of the sides I would put their origin point right along the edge that connects to the face. Then create an event that would scale the width of those 2 sprites according to difference in x position of building and player, either in every tick, or only when player moves along X.
B
8
S
2
Posts: 32
Reputation: 620


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests