GetHitResultUnderCursorForObjects and EObjectTypeQuery in C++
There are a few questions discussing EObjectTypeQuery on the AnswerHub that were never answered but they are fairly old so I am hoping something has changed in the meantime. I am trying to use GetHitResultUnderCursorForObjects() so something like this
but how do I know which object ObjectTypeQuery1 corresponds to? Just for concreteness lets say I am trying to find HitResults for objects derived from a class called AShape. Is there any workaround for this? In blueprints you can see the list of objects so I assume it must be possible somehow.... Thanks!
asked Apr 02 '18 at 12:43 PM in C++ Programming
The logic of the pointed method is based on "collision channels" and not directly on "actor types". Here you can find more detailed information using BP (of course it applies also to C++): https://impetus-games.com/blog/Rotating-an-Actor-towards-the-Mouse-Cursor-in-UE4 .
For the C++ side, after having properly configured the collision channels as explained in the above link, here is an example on how to fill the input array using both predefined and custom collision channels:
answered Jan 02 '19 at 07:40 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here