- Home /
If gameObject's center passes through a trigger?
In my game I need a trigger to only activate if the center of the gameObject entering the trigger passes through the trigger? Is it even possible? If not, I would like to know.
Answer by ray2yar · Dec 27, 2018 at 11:20 PM
I would suggest putting a different collider inside your object at its center and on a child gameobject and in a different layer. Then use the layer properties in the settings and make it so that the these two are the only ones that interact (such that your trigger doesn't trip by your objects normal collider but by one on the child object.
Alternatively you could use the trigger to start a procedure that checks the location of the object in intervals.
Further, you might be able to just move your trigger further so it hits later.