I saw a topic about OnHit() that is closed because they found a solution. Anyway no solution is showed, so, in practice, where we have to put AddDynamic, since in the constructor does not work?
I found the problem.
During the lesson it was showed the OnHit function and the arguments to pass in it. The final argument was “FHitResult Hit”.
I changed it passing by reference (“FHitResult& Hit”) and the code compiled correctly, both with AddDynamic in the constructor only, and in the BeginPlay() only.
My UE version is 4.22.3.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.