"Multiplayer" How do I target another player with LineTrace? (Channel?)

Basically as the “Your Question” title states. I’m trying to target another player with Linetracebychannel (Made a macro)
Here’s the image below… I’ve tried casting to “ThirdPersonCharacter” but it didn’t work, as I expected. Wasn’t expecting it to be that easy, but I was hoping it’d be. :b Any help would be heavily appreciated.

What does the inside of your macro look like? What is calling ShootPlayer_LIneTrace?

None of that is important. I have that all setup for both server/client. I’m asking, how do I cast to the player that is hit. "Player1 line trace hits " inside of the macro is LineTraceByChannel.

You said you tried to cast to ThirdPersonCharacter already, but WHAT property on the hit result did you try to cast?

You should be casting the Hit Actor that’s in the Break Hit Result node to ThirdPersonCharacter.

If you need help, you need to provide the community with details. Details allow us to help you better by giving us a clear steps to reproduce this in our environment with your setup.

I’m sorry for not stating that I didn’t use the “Hit actor” output… But I’ve already obviously tried that. I got all of the line trace setup, I know how to use Linetrace, I don’t know how to target another player on Multiplayer. The title is asking “How do I Target/Cast to another player with Linetrace.” I’m generally asking how do I target another player. Do I use casting? Or is there another method I’m supposed to use when it comes to targeting MP Players.

I think a better function to use would be LineTraceForObjects and pass in the object types that should “block” the line trace. Your requirement is to detect other ThirdPersonCharacter player’s with the line trace, so your line trace should be set up to target the Pawn object type.

Alternatively you can create a new object type, like “PlayerPawn” or “ThirdPersonCharacter” by going to Edit > Project Settings > Engine - Collision and create a new object type with what ever name makes sense for your game.

Once you create the new object type update your ThirdPersonCharacter so it’s collision capsule object type matches your new object type and then update your LineTraceForObjects so it looks for your new object type.

The benefit for going with a custom object type instead of using the default “Pawn” object type would be if you don’t want ALL pawn object types to block this line trace.

I got it with the New Object Type. :slight_smile: Sorry I was being a bit rude, but I’ll try my best to be more descriptive in the future. I honestly thought my macro has nothing to do with it.