Infinite race track for a car game?

Hi there guys :slight_smile:

I’m working on a car game, which has teams and they race against each other, but they go in the opposite direction on the road. I would like to make the road infinite, so when they finish a lap, they continue to proceed forward from the start, keeping the same speed. I would like to make it continuous, so they do not “teleport”. I was thinking about putting a portal at the two ends of the track, like in Prey

so you can see through it, see the enemies approeching and the level will seem infinite because of that.

Any Ideas how can I create such a portal in blueprints? Any idea is welcome :slight_smile:

Thanks guys :slight_smile:

Lets say I got a 100 meters long track, with a start point “A” and an end point “B”. I can make it loop, and make it “infinite”, so if one passes point “A” they seamlessly continue from point “B” and vice versa. There are two teams, one starts at point “A” and goes towards point “B”, the other starts at point “B” and drives towards point “A”. In this way, when they will pass each other over and over again.
If I make an infinite long loop, I have to manage that all cars are at all 100 meter long section. That seems like a complicated solution. I guess I could make just 3 adjacent sections, and erase the other ones, but still have to track all cars thrice?

Couldn’t you make the track a loop?

But if the track is straight line, you can achieve an infinite effect using two render targets, each positioned at either end of the tracks. You could then create two planes at the ends and apply a material. Within this material, make sure the texture source comes from the render targets that you created.

However this is NOT good on performance. And if your track is open (ie it is not inside a tunnel and players can see whats around them), the portal effect wont be convincing.