how do enable two box colliders on the same gameobject throught script?
i have a script which makes my enemy ragdoll when shot. if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range)) { RagdollController ragdoll = hit.transform.GetComponent<RagdollController>(); if (ragdoll != null) { ragdoll.die(); }
this works fine however due to this line of code setColliderState(false);
which turns off all of the colliders when i shoot the enemy it does nothing. i tried to fix this by using boxcollider.enabled = true;
but since i have two box colliders which i need to be on, it only turned on the first one.
so i would like to know if there is a way to enable both of them or change one of their names.
please and thank you.
Your answer
Follow this Question
Related Questions
Raagdol colllider is soooo big and so senstvt numbers i cant even cgange them 0 Answers
Check if position is inside a collider 5 Answers
Spawning with trigger 2 Answers
How To how ?? 2 Answers