Mouse Based Parallax Menu

Hi guys,

I’ve been doing some digging on the Internet and so far haven’t found much help regarding this subject.

I was wondering if its possible to make a mouse-based parallax effect for the main menu of a game. (As an example of what I mean see this video: - YouTube)

I’m not super confident with C++ so being able to do it in Blueprints would make things easier for me, but if it can’t be done then help in C++ would also be greatly appreciated.

This is a university project, by the way, so it doesn’t have to be super perfect.

Thanks :slight_smile:

1 Like

You should be able to achieve this effect with UMG fairly easily. I’d start with creating 3 separate canvases nested in yet another canvas.

This way you can add elements to any layer and shift each layer in the master canvas. Mapping mouse screen space shouldn’t be too difficult either.

Look at the MapRange node - it will allow you to translate mouse movement into widget movement.

1 Like

Something like this:

https://gyazo.com/0103e16e0f588b4fa29153b2e464bd12

This is obviously far from shipment ready :wink: but should be a decent starting point. I used a blurring widget here - not a good idea as it blurs everything in the background, go with prepped images instead.

Hi Everynone,

Thanks very much for your help, this works great :slight_smile:

Sorry to come so late but I need to put in my main menu a parallax and i have done what you suggest but i don’t really understand what i need to put in mygeometry and Mouse event inputs to make this function work.

I have trying this but like you see there are a problem with the location of my pictures when my cursor enter the game.
What can do that ? :confused:

232615-unreal-engine-demo-03032018-18000602-converted-wit.gif