# Orthographic Parallax

**URL:** <https://forums.unrealengine.com/t/orthographic-parallax/307235>\
**Category:** Rendering\
**Tags:** orthographic, parallax, background, unreal-engine, question, Blueprint\
**Created:** [February 17, 2015, 5:14pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235 "2015-02-17T17:14:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rett](https://forums.unrealengine.com/u/Rett)\
**Post date:** [February 17, 2015, 5:14pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/1 "2015-02-17T17:14:35Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![Andras2014\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andras2014\_1](https://forums.unrealengine.com/u/Andras2014_1)\
**Post date:** [February 17, 2015, 5:42pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/2 "2015-02-17T17:42:10Z")

</div>

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.:

 ![30239-answer1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/a/eaa96d6f1d51ef6f62fa44407c5c9f6c5bf85a99.png)

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

---

<div class="post-metadata">

**Author:** ![Rett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rett](https://forums.unrealengine.com/u/Rett)\
**Post date:** [February 17, 2015, 5:56pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/3 "2015-02-17T17:56:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andras2014\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andras2014\_1](https://forums.unrealengine.com/u/Andras2014_1)\
**Post date:** [February 17, 2015, 6:15pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/4 "2015-02-17T18:15:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rett](https://forums.unrealengine.com/u/Rett)\
**Post date:** [February 17, 2015, 7:02pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/5 "2015-02-17T19:02:26Z")

</div>

Thanks for the reply.

Here is what I just attempted:  
[http://puu.sh/g1a6K/3e0b702cd4.png](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.

---

<div class="post-metadata">

**Author:** ![Andras2014\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andras2014\_1](https://forums.unrealengine.com/u/Andras2014_1)\
**Post date:** [February 17, 2015, 7:04pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/6 "2015-02-17T19:04:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andras2014\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andras2014\_1](https://forums.unrealengine.com/u/Andras2014_1)\
**Post date:** [February 17, 2015, 7:06pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/7 "2015-02-17T19:06:52Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![Rett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rett](https://forums.unrealengine.com/u/Rett)\
**Post date:** [February 17, 2015, 7:28pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/8 "2015-02-17T19:28:17Z")

</div>

Ahh okay thanks. Still a few problems though.

Here is how I have it at the moment: [http://puu.sh/g1cfC/d6e97b9e60.png](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.

---

<div class="post-metadata">

**Author:** ![Andras2014\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andras2014\_1](https://forums.unrealengine.com/u/Andras2014_1)\
**Post date:** [February 17, 2015, 7:37pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/9 "2015-02-17T19:37:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rett](https://forums.unrealengine.com/u/Rett)\
**Post date:** [February 17, 2015, 9:05pm UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/10 "2015-02-17T21:05:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rett](https://forums.unrealengine.com/u/Rett)\
**Post date:** [February 18, 2015, 12:56am UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/11 "2015-02-18T00:56:09Z")

</div>

I think I figured out a better method  
30293-

---

<div class="post-metadata">

**Author:** ![Kadanss01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kadanss01](https://forums.unrealengine.com/u/Kadanss01)\
**Post date:** [October 14, 2023, 3:08am UTC](https://forums.unrealengine.com/t/orthographic-parallax/307235/12 "2023-10-14T03:08:00Z")

</div>

okaaaaay which wass ???/
