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