How to create overlap just for AI

Hello, I have a collision box, Its working for AI cars, but when Player in it, its going to cast fail. I dont want to player trigger this collision. Only AI
How can I do it?

trafficLight

Thank you

The collision system has a fairly large rake of objects. You can try seeing if this works for you, setting it to ignore pawn?

image

Otherwise what I think you have is fine. You would simply do nothing if the cast fails.

My AI also Pawn class, its not worked :frowning:

So just do nothing when the cast fails? That’s how it is intended to be used really.

Hey there @AngelisDead! Sounds like you’re looking to make a custom collision channel. This allows you to completely ignore collisions so no hit event can be processed at all. So first thing, you need to go into your Project settings and search “Object”, first thing you should see is this. I made an example, AIcars.

After that, on your AI cars you can set them as that channel, set up their collisions as custom, then ignore pawns or world dynamic and bam players won’t be able to contact them. Alternatively you could just go to the player as well and also just ignore any AI cars it overlaps with.

image

Let me know if this helps!

2 Likes

Turn off the overlap events on the component when a player enters it, turn them back on when an AI enters it.

Best working way. Thank you.