Arrow components - Click event
I have to render arrows in the three axis and manage the click events on this arrows to move the actors. I created an actor with some components, in which are included the arrow components (defined in ArrowComponent.h). The problem is that the click events never fire in these components.
Code used to set the event in the BeginPlay function:
And the code of the function:
I tried with other component in the same way and it worked, but no with the arrow. Maybe a collision mesh problem?
asked Apr 14 '16 at 08:15 PM in Bug Reports
Solved adding a UBoxComponent to manage clicks on the arrows.
Code for one arrow:
In the .h:
In the constructor in the .cpp:
In the BeginPlay event in the .cpp:
Then now only have to implement the onClickFlechaX function.
answered Apr 17 '16 at 06:05 AM
Actor and Component click events use collision system, if your actor/component can't collide it can't be clicked, arrow component if im not mistaken is visual only, so use same extra shape component around arrow component like UCapsuleComponent
answered Apr 15 '16 at 03:18 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here