Lag when turning

Hello there.
I made an infinite road map were a bridge mesh get sonstantly moved so that it looks like the bridge goes on forever. Unfortunately everytime I turn as a player, there are lag spikes appearing. I already removed the collision and miniminzed the texturesizes to lower the texture memory but that didnt seem to help. My though was it could have something to do with the bridge being moved thats too much work for the engine, but I really dont know. Any ideas?

2 Likes

Hey @Emperock!

How often does your road move / what are the parameters for movement? It could be that turning causes the movement to happen too often depending on how you set it up. Would you mind sharing what you have so far?

Any additional specifics you provide may go a long way in solving your problem!

It moves constantly by its own, the player shouldnt have anything to do with it

Hey @Emperock,

So if the road is completely independent is the player moving at a constant speed over the road? Like is this in an endless runner style format or something else?

No. The player can move as in other 3d games and the road jsut moves underneath him. He technically stands on an inisible plane so that the bridge doesnt move him

Hey @Emperock,

So to be clear, the road keeps moving when the player stops or does the road stop as well? How are you calculating the movement? Would you mind sharing your blueprints so far so we can get a better understanding of what you are doing? Given the current information it is difficult to tell what could be happening or going wrong.

We can definitely figure this out with more context.

This is the blueprint. Unfortunately given the circumstances I ant show you a video

It can be anything. Overfloved pool (distance fields, Nanite, Textures, loading of new assets). The same goes for culling or the blueprint needs to be adjusted. Sometimes it is necessary to profile it.

You can try any stats for lags, whether it’s large disk resources, memory, culling, etc.:

edit: Sorry. Screenshot was rescaled. At the top, find “unit” or “memory” in the stats. At top is “tools” and bottom is “derived data cache”. But its different situation in game build and in editor.

Thank you. I will have a look at it and update

But first, check the units. Because I’m not entirely sure what you want to achieve by that tick. From my point of view, it would be better to spawn the path in front of you as you get to a certain distance. Or turn off collisions for that bridge, have two blocking volumes with a trigger for the Player, and when you get behind the first one, move it in front of the players. From what I understand you are trying to move the ground under the player that he is trying to walk on?

Well we dont want the player tom move so we have the environment move instead