How do you refer to another gameobjects collider in script so you can resize its
eg// radius , height etc
1 Answer
1For the most part I understand, so I will try and make a slightly different suggestion. Would it still work how you want if you were to create a new GameObject under the parent GameObject like the parent is “BadGuy” and the child can be called “AttackCollider” for example, and you add the component collider to AttackCollider in the inspector, and take away the collider in the parent (basically exchange the collider from the parent to the child). That way, to reference it, all you have to do is reference the AttackCollider GameObject.
Make sense?
Oh yeah that makes sense and i see a possible solution isit possible if you show an example or a link to something that shows an example
– Charles_GamsI'm sorry I don't quite have the time to make an example project, and the idea was pretty much from the top of my head but if you have some code, you can put up the section you need help with, and I'll try and help where I can
– David_Kamunyu
What is it that you are trying to get done? Like when 2 objects meet, one of the colliders grows, shrinks etc?
– David_KamunyuI've got a bounce attack feature just like in sonic the hedgehog and it works , however it doesn't loop all the time because the radius of the bounce attack or colliders radius stays the same. The bounce attacks radius is another gameobject that has a sphere collider. I want to reference that gameobjects sphere collider radius in another script thats not attached to the gameobject if that makes sense
– Charles_Gamswhen i say not attached to the gameobject i'm basically stating theres two hopefully that clarifies everything
– Charles_Gams