My collision solution was a little different

I created a singular collider for the Rocket prefab, then called using

rocketCollider = GetComponent<Collider>();

and toggled the same way:

if (Input.GetKeyDown(KeyCode.C))
    {
        rocketCollider.enabled = !rocketCollider.enabled;
    }

This was a full collision disable allowing me to actually fly through the walls.

When adding in “trainer” features I like to use the the debug flag:

bool debugMode = Debug.isDebugBuild;

if (Input.GetKeyDown(KeyCode.C) && debugMode)

That way I don’t have to remember to disable them for regular builds :slight_smile:

2 Likes

Privacy & Terms