How can you target the edge of the player tank?

Hi,

I’m trying to extend Toon Tanks a bit. In addition to checking range I’m also having the towers check for a line of sight, so they don’t mindlessly shoot at the wall, but I’d want them to be able to see the edge of the tank poking out past a wall and target that, instead of always targeting the tank origin (which is where the sphere sweep points).

Is there a way to do this? Essentially I’d want the wall to block most of the sphere sweep, but report if a part of the sphere gets past the wall and hits the tank. I suspect that can’t be done, so perhaps I need to somehow locate the vector to the tank edges and line trace each of them to see if any hit, but I can’t work out how to find the edge to target either.

Thanks,
Matthew

I suggest trying out the AI Perception feature AI Perception in Unreal Engine | Unreal Engine 5.1 Documentation

Excellent. Thanks Dan. I knew there had to be be something that would handle this, I’ll check it out.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms