Hello @Ninjin,
Important Side Note: This solution assumes that the reader has seen my previous answer about turning off “Enable Gravity” on your physics bodies being propelled by the rockets. This solution will not work if your physics bodies have “Enable Gravity” checked.
I figured out why your rockets weren’t landing where they were supposed to.
Problem:
So to understand why your previous solution wasn’t working, you have to understand how Blueprint function calls work. Whenever a Blueprint function is called by a white wire all its input wires work backwards. So if you have a function that takes in a random number as an input, that random number is calculated every time the function is called. This means that the same input wire will can return different results to different functions because it is computing a new value every time it is called. To illustrate this, I created a some simple test code. I highly recommend you run it and see its results.
As you will see from your output this code will almost always print different numbers. This is because the “Random Float in Range” function is being calculated every time a new “Print String” function is called. Your previous solution was doing something similar to this, but only on a greater scale which made it harder to detect.
Solution:
To solve this problem, simply store the random value into a local variable. This way the random value is calculated once and stored in a variable to be reused reliably in other parts of the code. This is another small scale example that will print out the same random number.
I applied the same solution to your code. I made sure that I calculated the random value of the impact site once and stored it in a variable for use later. Below is the modified version of your code and will produce accurate impact sites for the rockets. I had to cut the solution up into two photos.
Solution Photo 1:
Solution Photo 2:
This question was incredibly interesting and is a great illustration of how Blueprint functions work regarding their inputs. I hope this answer has been informative and will help you out.
Farshooter