I Have here two overlapping colliders/renderers
I have a script that when one of these boxes is registered it will “disable” the overlapping portion. The event is being called, and there are no null references with the bounds. I am wondering if there is a problem with that both objects are children, is their bounds returned in local space because they are children?
(note: both of these objects are NOT planes)
void SFM_OnFramePlaced (Frame _frame){
if (_frame.buildSlotType.Equals (BuildSlotType.Floor)) {
Bounds frameBounds = _frame.GetComponent<Renderer> ().bounds;
Bounds myBounds = this.GetComponent<Renderer> ().bounds;
if (frameBounds != null && myBounds != null) {
if (frameBounds.Intersects(myBounds)) {
DisableEdge ();
}
}
}
}