This question was
closed Aug 07, 2016 at 11:43 PM by
SarperS for the following reason:
The question is answered, right answer was accepted
Question by
$$anonymous$$ · Jul 28, 2016 at 12:07 AM ·
colliderscalingradiusshapes
Getting the radius of a cylinder
I have a cylinder that I am using as a circle in 2D( It is rotated 90 degrees). I want to get the radius of that cylinder, How can I do that ?
I tried to get the Radius from the Capsule Collider but that is always fixed to the 0.5 even if i change the scaling . Here are some screenshots about it.
Thanks.
screen-shot-2016-07-27-at-165714.png
(211.4 kB)
screen-shot-2016-07-27-at-170224.png
(186.3 kB)
Comment
Best Answer
Answer by $$anonymous$$ · Aug 07, 2016 at 11:08 PM
I figured out that transform.localScale.z(should be x if it was not rotated) of the cylinder actually gives the diameter ( radius *2 )