OnClicked.AddDynamic Not Executing Function
I'm new to Unreal Engine and C++ and am currently trying to get a UE_Log to print when I click my default pawn.
I've added this function to my pawn's .H which inherits from APawn.
I've also added the following to the corresponding .CPP in the constructor.
Here is the function in the same .CPP that I expect OnClicked.AddDynamic to call.
Alas, although the code compiles, the log is never printed no matter how I click the pawn in the game. Can anyone help me?
asked Nov 27 '17 at 03:15 PM in C++ Programming
1) Have you enabled mouse clicks? See:
2) For determining where you clicked in the world, see:
3) so you get world position of the mouse, then if you do
4) and then use the HitResult from the trace, you should get all the information you need.
Hope that helps :) Cheers!
answered Nov 27 '17 at 07:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here