Hi all~
I do a ray cast in BeginPlay Event of my playercontroller, but get nothing. In any binding event ex keydown, I can get a hit result correctly. The thing is I want to know what event is good to do a ray cast except keyboard or mouse event . I would like automatically get hit result to place my other objects.
You can do raytraces anywhere (even in the editor when the game is not running).
Might be worth checking that your raytrace actor is indeed in the location you want it to be. Try using DrawDebugLine to show an actual line of the trace for a few seconds, this way you can see if your trace is actually in the right spot!