Limited distance bullet ! !

How to make bullets for a limited distance?

P.S. I made the bullet with projectile movement. (Side Scrolling Game)

In the blueprint of the projectile, store the location of this actor on BeginPlay. On each calculate the projectile has travelled from that stored location and if it’s over a certain threshold, destroy the actor.

thanks, but how do i calculate the projectile traveled?

|CurrentPosition - StartingStartingPosition|

Then vector length out of result from above.

Thank you guys, i am trying.

That’s what the | are for :stuck_out_tongue:

imo just set correct initial life span… [projectile speed] * [projectile life] = [distance traveled]

It’s good solution, but it won’t work if the bullet decelerates or accelerates.