Hitscan Turret Targeting

I’m working on a turret that damages targets by hitscan via Line Trace By Channel, it works to an extent. For some reason the line trace fires right above the target’s capsule component. This could be mostly due to how I have the PawnSensing function set up with rotation but what I am curious about is how could I set up a custom end location for the line trace? For example, directly at the chest area of all enemies the turret sees. Is that the default but my Set Actor Rotation function is just throwing it out of whack or can I actually set up a custom location? Thanks for taking the time to read my post and I look forward to suggestions/questions.

Can you show viewport of turret? Where is Turret damage spawn located?

The TurretDamageSpawn scene is where the line trace spawns from, I’m sure you’re aware of that just getting all the info out there for clarity. Thanksf or taking the time to take a look.

So you rotating whole actor, not just z axis?
Is turret hight is lower that players?

At the moment I am rotating the entire pawn, I haven’t implemented an Aim Offset yet to where the head of the turret should be the part doing all the rotating. I just started working on this turret yesterday and was just trying to get the gist of what I’m going for built.

I’ll make a guess that turret fires above, because of turret damage spawn location offset from the center.

Yeah, when I play and run around it looks like the line trace should be hitting me but if I add in a client and watch the line trace work it just goes right above the character’s capsule. If I run around the client I can then see the line trace working as intended but mostly because the turret is still targeting server rather than client. Not sure if that was the sort of response you were looking for, but I hope it helps understand more of what is going on.

Break New rotation pin on Set Actor Location, and instead of setting rotation to all axis, set only z axis. See what happens.

I’ll give that a try, thanks for the advice.

To target the chest you need to get the “chest” bone location on the target. For a default pawn that would be spine_2.

Bone location would be the “End” point on a trace.

Didn’t think to target bones, awesome advice. I’ll have to test that out, Thanks for the response.