Emitter spawn defaulting to center of level

I ran into an issue with the spawn point of the impact emitter defaulting to the center of the level if the line trace does not hit any object. This is because there is no check in the code to see whether or not the line trace hit anything at all, and since there was no hit result to return an impact point, the spawn point defaults to the center of the level at (0, 0, 0). The solution is pretty simple, just add a branch checking the return boolean built into the line trace function that returns true if the trace hit anything.


Excellent debugging and solution hunting!

Privacy & Terms