Why Projectile movement bullet stop firing?

Hey Guys,
I`ve setup a car driving in only one direction Firing projectile bullets after 1 minute and 30 seconds driving in that direction the projectile stop spawning and I cant figure it out why its stoping.
Anyone have any idea why its stoping?

Thanks for answers in Advanced<3

You’ve reached the end of the world perhaps? What are the coords when this starts happening?

Hey Everynone thank you for the reply <3
Its stop around 1064030.0 on the X Axis is there a way to keep it going or something?

Its stop around 1064030.0 on the X
Axis is there a way to keep it going
or something?

That makes a lot of sense, actually. Physics become unpredictable after 0.5 million unreal units, floating point ops errors and all that jazz to be blamed. And I don’t think you can spawn new actors beyond 1m uus.

The easiest way to circumvent this is to use World Shift Origin. Essentially, it moves all actors to a new position - can’t recall if it supports multiplier these days, it didn’t use to.

I have no time to test it but it should be something along the lines of:

You can fire it once the player reaches half a million units in any direction. It should center the world around the supplied coordinate. I hope I did not fudge it up.


If you want a truly large world, consider looking into world composition:

and this one for more hands on approach:

Thank you for the answer<3
Is there a way to attach world origion to pawn or actor ?
or I need to just trigger telport all active actors to world origin?

Check where the player is and, if they exceed X Y or Z, fire the above and feed it the player coordinates. That should be it, the node does all the transformation, shifting the entire world. It’s been a while since I used it, though. Do tell if it worked.

It works but I managed to fire it only once, How can I set it so when the player pass half a million units it will fire it?

You could have it run on tick:

The actor here is your car. If you get more than 10000 uus from the world center, the world shifts. You do not want to shift the world too often - it’s a demanding operation. You can try setting it to 400000 and see how things behave.

Alternatively:

  • you could have it on a timer and check every couple of seconds

or

  • you could have a trigger volume that fires when players leaves it, just remember to re-position the volume back on the player location after shifting the world

Okay so the shifting is working but now I have new problem my road generator everytime I shift the world origin I have huge gap between the raods…

Okay so the shifting is working but
now I have new problem my road
generator everytime I shift the world
origin I have huge gap between the
raods…

Not sure - I’m assuming here the generator is spline based, perhaps the spline mesh components are not attached to an actor and never get translated into a new location. Hard to say without seeing how it works.


Originally, I thought you were making something akin to an endless runner, but with more driving, less running. If you actually have a complex world that needs to be large, you will need to consider world composition.

This is how I get my road spawn in the world…
I`ve also tried to make the road move instead of my pawn it worked really nice didnt had to shift the world but that also made huge gap between the roads :c
Maybe you have any idea how to keep them attached?

I also tried to move the road instad of the pawn but I still get huge gaps between the roads I still cant figure it out why its not attach to the new spawn point I set up…
Maybe you know how I can fix the gaps?

What’s in those screenshots is not the problem. You’d need to investigate the way the spline mesh components are created and added to the actor that makes them. Not sure if this can be solved - I haven’t worked with splines and world shift origin at the same time. Maybe it’s just buggy.

My gut feeling tells me it should work fine, though. Can you show the bit where the components are added? Perhaps attaching them to the root of the actor can solve it or they may need to be updated, to match the new spline position.

Can you also show what you mean by the gap between the roads - is it a gap between the actors or the spline mesh components are no longer aligning?

What I’m thinking is that the world shift moves the spline but the SMCs are never updated, which is somewhat expected.


To this point I’ve only assumed this is spline based - is it? Is this a system you made yourself or one of the marketplace generators?

So is this just 1 static mesh in an actor? The mesh is attached to the root of the actor? Or is the mesh the root?

You’re doing some crazy stuff here, so that’s understandable. Sorry, this makes no sense. Why make array and then get something out of it, you’re already iterating… just use that. And you’re trying to shift everything for each element - that’s not going to work. So you’re moving the entire world multiple times for each road actor, to that road actor’s location… And Get is trying to access non-existing elements.

Consider looking into why the road actors are not shifted correctly in the first place rather than trying to brute-force it. Otherwise you’ll hit a real roadblock (no pun intended).

Its not spline based… I added Arrow component to the end of my road mesh as an attach point

also this is not marketplace generator.

I got 3 SM in this Actor the road and 2 side blockers I might combine them into 1 SM later and I got them set up in the BP like this:

299772-9.png

Okay so I fixed the problem with the gaps between the roads by shifting everything, The pawn and the roads with this BP I made:

but now I have new problem Im getting FPS drops from 120 to lower then 10 FPS and Im getting this error:

Whats make no sense?
the BP or the FPS drop and the error that I get?

The blueprint, as described above.