Hey devs. I want to make a background look like its moving while a player is in a car, like trees infinitely moving by, etc. How may I go about doing this?
You’d have the background to blur the opposite direction of the cars movement, and the car is the only thing that isn’t blurry. Much like this image.
Every part has to be detailed, but only appearing for a short amount of time.
The wheels also have to be slightly blurred to make it look like they are moving, and the road should change a lot, roads don’t stay the same.
Thank you, but that wasn’t much what I was looking for on the scripting side of it.
Oh… hmmm, are they 1st person mode or 3rd person view? Since this causes drastic differences in movement.
It’s a 3rd person view. For more specifics, skip to 4:44
https://www.youtube.com/watch?v=w2fWnx0RTjE&t=1194s&ab_channel=GoldenDynasty
But in that video, that is kind of my goal to achieve here
I am a builder so I ain’t the greatest at scripting advice, but I think the vehicle should have a nice move script, where the background is kind of repeating itself, you can make it so when it reaches a certain point the vehicle resets back to the start position of the background
so you don’t have to make a really, really long background., I’d make sure its a smooth transition and isn’t visible to the eye when it resets.
@Vozcom or @nooneisback could help you with the actual scripting, they are pretty good scripters from what I’ve seen. Sorry if this didn’t help much, I do try.
Thank you for this advice, I appreciate it.
The ground, trees and tracks are just similar models that get moved from front to back, then back to the front with fog covering it all up. First define the amount of segments that you want, their length and the movement speed. Then you just move every segment each frame by TimeDelta*MoveSpeed. The time delta is obtained as an argument returned by the Heartbeat event. When the segment gets too far in the back, move it back to the front.
Thank you for your reply. As I am still learning scripting, do you mind if you go a bit more into depth by what you mean? Thanks again.
This is the basic concept. You just move the segments from the spawn distance to the max distance. If the segment is beyond the max distance, you move it to the spawn distance.
Okay, I think I know what you mean now. Below, I created my first segment/spawn.
So according to your diagram, should i duplicate the segments until a max distance? (The one i want of course)
Basically, yes. For example, if you want the max distance to be 50 studs, you’ll need enough segments to fill out 100 studs. Then you just move them from 50 to -50.