Removing obstacles with updateGraphs()

Help please :frowning:

showing what i mean

gameObj.GetComponent<Collider>().enabled = false;<Collider>().bounds);

(gameObj is the rectangle on the screen set in the inspector)

How come its not filling in the entire bounds of the collider?
The collider size should be correct considering it managed to remove it from the graph and I am using the same collider to refill the graph.

It works fine if the original box isn’t scaled…

Interesting part of the Unity documentation for the .bounds property.

Note that this will be an empty bounding box if the collider is disabled or the game object is inactive.

So when you actually call UpdateGraphs, you will not get the whole bounds of the collider.