Download

How to make my actor do something when entering specific collision boxes?

Hello there guys, Im trying to make a physics cooking game, so I placed collision boxes for the kitchen machines so that when the food enters them, it starts to cook. The problem Im facing is that I made a new collision box for another thing, but when the food actor enters it, it starts to cook as well. On the “On Component Begin Overlap”, how would I be able to set specific collision boxes so that the food actors only start to cook when entering them.
Many thanks.

One way is to make a base class ‘kitchen machine’ with the collision box. Then make a child of that and say what happens when you put the food in.

Then, you can make another child, and write different code for what happens when the food goes in.

Another way, is to have more than one collision box in the BP. If you say ‘begin overlap’ it will consider all boxes ( I think maybe that’s your problem ). But it’s ok, because you can have overlap events for specific boxes. Right click on the box and:

Screenshot_8.jpg

then you get a box specific overlap event:

Screenshot_9.jpg

Thank you for your answer, Im new to Unreal so I dont know yet a lot of it`s features. I tried messing with tags and It worked perfectly. But I will keep your idea in mind. Thanks again