I’m trying to make another type of projectile: what I have in mind is something which can be fired from the vehicle while it is running and that kind of follows the track until it collides with a target.
I made some experimenting, a BP with the following components: a static mesh, a spline and the logic to move the static mesh along the spline.
I added the BP as a child actor in the vehicle BP and spawned it using the Spawn Actor Node. The projectile spawns at the desired location but it behaves strangely: the mesh moves much slower than it should and the changes to the spline in the parent BP doesn’t affect the path of the projectile spawned in the vehicle BP.
In my understanding I need to get the spawning point of the projectile, spawn it, make it travel to the position of the nearest spline point and then make it to move along the spline from that point.
Now I’m wondering what could it be the right way to do it: should I use a projectile component and move it along the spline? Is it even possible?
Should I use a static mesh?
Should I use multiple BP, one for the spline, one for the projectile component and one for the vehicle?