Cast to character to check the trace result always failed


I got problem when i want check if the actor that traced by the tracer is a character or not its always resulted in cast failed


Which actors do you ignore in your list? A screenshot from the whole execution path before your Cast would help to find your problem :slight_smile:

i’m ignoring cast to character with ’ controlled pawn’ from 'Event receive tick AI ’ as the object

Ok, so here we go:

But first things first: Because you let draw the LineTrace, I assume the LineTrace works?
For test purposes you really want to reduce your field of error to minimum: So please drag the Execution-Wire from EventReceiveTickAI to your cast to skip the branch.

So the most of the time your cast fails because nothing gets hit at all. So this is why you want to check this case as well. And to be able to know what is getting hit by the LineTrace you can print this info out:

If you execute this, do you see the names of the Actors you would expect? Or is “Nothing hit at all” printed out all the time. Because then the LineTrace does not work due to wrong start or end positions.

Happy debugging :slight_smile: Marooney

thx Marooney!!

its working now , the problem is on the channel that i trace , i change it to custom channel and its working now
thx man ,

and how to mark this post as resolved?? haha

I am glad it works :slight_smile:

On the left side of the answer bellow the up/down arrow, there is the accept answer check mark. (If answer turns green you hit the correct one ^^)

And please keep in mind, just in case someone writes a comment in an already accepted answer, you need to accept it again. People will appreciate this :slight_smile: