Calculating projectile movement in one frame

Hi all :smiley:
I’m currently working on a trajectory-aiming system in blueprints.
The way it works at the moment is that I shoot an invisible projectile and spawn a plane with the crosshair texture each x seconds on the current position of the projectile.
It does work, but I want to be able to move the camera and the trajectory adjusts to that, so I somehow would have to “simulate” the whole projectile movement in one frame, so I can link it to event tick.
Any ways I could do that?
Or any other suggestions on how to solve this Problem?

Thanks a lot :smiley:
Do you have any more informations about the values of the variables?
Would be especially interested in the gravity variable, but also AirFriction, DeltaSim, Gravity Scale ans Sim length (<- this one is the amount of “steps”, or how detailed the curve is right? so I could just guess that one…)

simTick is called every tick.

AirFriction is a value between 0 and 1, 1 being no friction, 0.1 being very slow friction, but i disconnected that whole branch, so if you use friction, just set it to 1.

gravity is a vector that represents the direction of gravity, (0,0,-1).

gravity scale is a value you can play with to amplify the gravity.
981 cm/s is earth gravity, so thats a good place to start, but use whatever works best.

deltaSim is like deltaSeconds from event Tick, and its used to adjust how much distance in time and space between each point in the arc.

adjusting simLength changes how many iterations the function uses, which makes the line have fewer points, but also makes it shorter, so you may have to compensate by increasing deltaSim every time you decrease simLength, to keep the arc the same length, but make it less detailed.

as long as the function matches the way your projectile updates, it should aim correctly, so if you have a projectile you like, and you want to aim it, replace all of this physics stuff with the same math your projectile uses to update.

I got it working now, thanks a lot for your help :smiley: