Trigger work on full enter

What I am trying to accomplish is to have the trigger activate once the other object is fully inside the trigger. When I use OnTriggerEnter() all it does is start the trigger as soon as the object touches it. Is there any way to achieve this?

PS I have already tried and succeeded in using a delay to wait a fraction of a second before calling the function, and this works. However, if I change any speed values, I will need to recalculate the delay every time.

Thanks

So the point is to know when A’s boxcollider is full inside of B’s boxcollider.

  • First, use the trigger callbacks to
    know if the object A is touching B.
  • Then, calculate if all the eight
    extremities of A’s box are cointained
    by B’s box with Bounds.Contains
    and Bounds.extents.

I should of prefaced this more, sorry about that. But the objects move along a board in a constant direction. Once they are are over a new square on the board, they check to see what direction they are supposed to move next. The problem however, is that they are checking as soon as they hit the trigger, and then moving, but since they are not checking at the center of the square on the board, they are not moving in line anymore.

You could probably lose the triggers, since they’re regularly spaced and you always know where you’re going next. Use more of the waypoint system to be sure you hit the center of the square – if((pos-targetPos).magnitude<0.4) compute next spot;