Then I just call the function in Tick, and it didn’t seem to work.
Both “Use Controller Rotation Pitch” and “Use Controller Rotation Roll” were ticked.
If I’m not mistaken, this will return a direction vector form the screen to the world (looking away from the camera). Telling it to look at it would practically be the same as to look from camera to world.
Sorry it didn’t work, I have tried using the hitresultundercursor in a similar fashion before. I think since I am doing a side scroller, the cursor is not hitting anything due to my camera set up, unlike in a top-down game. I did find a function called ProjectWorldLocationToScreen, converting 3d vector to 2d, but I can’t get the 2d vector into rotation vector.
I have also tried the following codes but still no luck: