How do I make parallax effect on mouse move?

Get help using Construct 2

Post » Tue Nov 01, 2016 2:15 pm

I need to make parallax effect on mouse move for my layers but I don't know how to do it. :/

Can you help me?
B
5
Posts: 12
Reputation: 249

Post » Tue Nov 01, 2016 9:31 pm

Take a look at this demo: http://nfk.kissr.com
Is that what you are aiming for?

This is the source code .capx:
https://www.dropbox.com/s/cd9v6imdn1sb7 ... .capx?dl=1
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Wed Nov 02, 2016 4:34 am

you just have to make your game follow the mouse position, only if you have your parallax already done in the layers

just put "System Every Tick: Scroll To = mouse.x and mouse.Y
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Wed Nov 02, 2016 2:51 pm

@IJCT

Except if your Sprites aren't big enough and your Parallax effect is too strong, you need to restrict the scrolling to not reveal parts of the layout where the Sprites aren't visible anymore.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091


Return to How do I....?

Who is online

Users browsing this forum: sean080 and 21 guests