- Home /
How to get the width of a cube in "coordinate units"
I have recently started to transpher my java game to unity, and am now struggling a little...
I need to get the width of a cube in "coordinate units". Eg. (!) to move it exactly about its width.
I'd be really satisfied to get an exact solution as requested so that i could easily transpher my java code ode C#, but am of course open for any advice.
Thanks in advance :)
Answer by Jeff-Kesselman · Nov 17, 2014 at 06:01 PM
The extents of any visible object are available from its renderer.
See http://docs.unity3d.com/ScriptReference/Renderer-bounds.html
Your answer
Follow this Question
Related Questions
A really quick Unity scale/units of measurement question! 2 Answers
Showing pixels in transform 1 Answer
How can I scale an object with keyinput and return old scale when I do not press like Mario crunch 1 Answer
scale to vector3 point 1 Answer
Make an object rotate instantly upon an event occuring in C# 1 Answer