(-) Any specific reason why you trace from a constant z = 2000 to -2000 instead of using the current z position of the character and then using current_z + 2000 to current_z - 2000? Cause with a constant z from 2000 to -2000 it will not work if the location you want to hit is higher than 20m or lower than -20m.
(-) Make sure that the “Return Value” of your line trace is true, so that it has hit something, and if it is true and still not working as expected, then try to print also the “Hit Actor” and “Hit Component” (maybe also “Impact Point”) and see if those are what you would expect.
Pretty self explanatory. I want to teleport a pawn to a location that depends on the player character location. However since my level is not planar at all it often appears underground or floating in the air. How do I fix that? Is there some way to know where the ground is or some other trick that could help me? (I am ok with using both c++ or blueprint even if I generally use blueprint because it’s quicker).
I tried using ray trace but for some reason it didn’t work out as I expected.
No specific reason at all, I just tried with many different z, either constant or dependent on the actor location.
In any case the return value of the line trace is always false as if it hit nothing but I honestly can’t figure out the reason for this.