(Amateur here, but… ) You used everything you needed, the only problem is that you think a bit differently than the Engine. This is how it should work:
- The Line hits an Actor. (LineTracByChannel)
- Get that Actor. (Hit Actor)
- Check if it’s an AiCharacter (put that Hit Actor into the Object variable at the Cast To AiCharacter)
- If it goes forward through Cast Failed then it wasn’t one.
In this particular case where you only need that bool, or in cases when you are almost completely sure that the cast won’t fail, do this:
Right click on the “Cast to (…)” and choose “Convert to pure cast”. It won’t need an Execution pin (the white triangle) it will be faster, and it will give you a boolean variable that tells you if the conversion was successful or not.