So we have
OnTriggerExit() which is great, but it activates only if an object has FULLY left the trigger. I was wondering if below scenario could be possible:
We have a big trigger and we have some small objects that are inside it. I would like to have these object bounce when they touch walls of the trigger they are inside in. I cannot really use
OnTriggerExit() here, because bouncing would happen only if one of these objects fully leaves the trigger. And the whole point is that I don’t want those objects to be able to fully leave the trigger, but rather stay within the trigger and bounce inside it if they touch its walls.
Now I know that I could place like 4 colliders as walls instead of having that trigger, but due to how gameplay works I cannot really do that. The gameplay would work better if I had the trigger and could check if an object is touching trigger’s boundaries, so that I could apply some bouncing force to it.