Cast to Character not executing

Hi all,

Im trying to create a mobile RTS game, with selecting a character with touch begin and moving it (animated) with drag and drop to the location of the touch end. But my cast to Character seems not to work. Its not failing, instead if I touch the character, nothing is happening. The character`s mesh has the collision preset “overlap only pawn”.
Can someone help?


Have you ensured that you have your character’s collision set up to Generate Hit Events? If you have, could you please provide a screenshot of your character’s collision details?

Here is an image of the option I’m referring to. Ensure that the box highlighted in red is checked:


Thank you for your help, I checked the respective box but without an effect.

See here my collision details:

So you say your cast is never executing. Is the Print String node firing? It could be that for some reason your Touch event is never firing off.

If I touch somewhere nearby the character the Cast Failed and the following print statement is working as well - so the touch event seems to work properly. Only if I hit the character nothing happens.

I’ve put together a simple test that I have working. Here is the blueprint:

Instead of using Get Hit Result by channel, I used for Object and looked for any objects of the Pawn type. This cast succeeded when I was mousing over my character, and failed when I was not. Would something like this work for you? If not, I can continue to investigate your issue.

I also tried “for object” but still no change. Find below the collision details for the Capsule Component (Inherited) and the mesh of my character. Maybe there is something wrong.

Obviously the character is not recognized as character or as clickable object. I guess that is why the cast is neither working nor failing - it just seems to get no input from break hit result.

I apologize for the delay. Could you please zip up your project and provide a link to Dropbox where I can download it? I’d like to look further into your setup to determine why the solution I suggested isn’t working on your end, as I’ve tested it a few times on my end and it has succeeded every time so far. Thank you.

im guessing its one of two things. 1. Top Down Character is not the name of your characters blueprint class, a common mistake i make when using assets from other projects, 2. your collision presets are whats causing it. Event hit is for blocking, overlap events are for overlapping, set your players blueprint to block all and i think this should work