Orthographic Parallax

I’m currently trying to make a parallax background in my Paper2D game but having some difficulty.

I found a blueprint that I thought I could modify to achieve what I want.
http://puu.sh/g12p5/5886a5fee5.png

I can’t seem to be able to get it to do what I want though, am I going about this all wrong? The blueprint I posted follows the player, for parallax I need it to follow the player but slowly let the player get further away from it. Any help is greatly appreciated.

I understand the basic logic of how this should work but not how to implement it.

Hi pndemc!

I have thought about your question for a couple of minutes and I suggest you refraining from event ticks this time. The easiest and most performance-friendly way to implement is this imo.:

If there is input, move, otherwise stop. The direction you can define from the value. (+ or -)

Thanks for the tip. Any ideas for the actual parallax part though?

So, you make an event that fires when it has to move, which would be a simple “Add actor local offset”, You just add the “axis value*speed” (where speed is a constant less than one) to the actual actor’s location’s X component, and leave Y and Z untouched.

Of course it does, because you didn’t connect the y and z values to the new location. So make vector, and then connect them. You are zeroing them out.

Sorry, it was with the case of the set actor location, if you add actor local offset, you don’t add the current location, just an actual number. (My mistake, sorry.) And please use make vector to make sure it works. (Not the float the vector.)

Thanks for the reply.

Here is what I just attempted:
http://puu.sh/g1a6K/3e0b702cd4.png

Ignore my use of Event Tick - just using it for prototyping as I could not get any input from InputAxis MoveRight inside this blueprint, but I have a variable for it being set in my character blueprint, and then I’m referencing it. (confirmed that part is working using print string).

As soon as I start walking my background disappears.

Ahh okay thanks. Still a few problems though.

Here is how I have it at the moment: http://puu.sh/g1cfC/d6e97b9e60.png

Theres no number between 0 and 1 that have it keep up with the player enough, you can pretty much just walk by it like normal (it does move though). Also if you keep tapping to walk instead of holding it it keeps up with you, but if you just hold walk you go by it.

Another problem is this doesn’t take into account how fast you’re walking, if you crouch walk the background moves just as fast as if you were walking normally.

Well, you can increase that number however you want, it was just a plain guess. Every scene is different.

Also, double check if you are setting up the input axis properly, then play around with the multiplication of the delta seconds (if you still want to use event tick), the input axis, and the random number. You should be getting close to it.

And one more thing: in my opinion, setting up a variable, in that case input axis and then checking it with event tick might be delayed. So make just the event with the input node.

I’ve tried a bunch of things and I can’t seem to access my inputs from inside this blueprint, how are you doing it?

Also where along the line can I involve my characters velocity so that this works for both walking and crouch walking.

Another problem I just realized is if you keep walking into a wall the background just keeps going.

I think I figured out a better method
30293-

okaaaaay which wass ???/