- Home /
How do I draw a torus in unity?
I'm trying to figure out how to draw a torus in Unity. I would like to be able to control the large radius to small radius ratio, I can't do this with an imported 3D model because there is no way to scale the two parameters independently.
If you need to create different ratio torus on the fly, then you will have to use the $$anonymous$$esh class like Eric5h5 said. You will create the points to draw the mesh.
Answer by Eric5h5 · Dec 18, 2010 at 03:43 AM
Use the Mesh class and whatever math is necessary to make a torus.
I was hoping there was an easier way to do this, like a plugin or something. I guess I'll have to go with the hard way.
Actually I seem to recall that someone wrote some torus code a while ago; I just did a search and found this: http://forum.unity3d.com/threads/8487-Torus-in-Unity
Answer by DaveA · May 07, 2011 at 06:09 PM
Go to the Asset Store and search 'primitive' there are at least two low-cost packs there.
Answer by Justin Warner · Dec 18, 2010 at 04:20 AM
Not possible... Look up the differences between a 3D Modeling software and a Game Engine. They're different, although many people don't seem to understand that...
Anyways, make it in 3D Modeling software, then import until you get it how you want it to be.
Good luck.
Of course it's possible, and he already explained why he can't do it with an imported model. See my answer.
You can because it takes time, he's being lazy, so do you really think he's going to make a math equation in order to do it? Unlikely... It's easy to make a torus in a 3D $$anonymous$$odeling application, make 5 different versions of it, go with the closest one, or if not the closest one, keep tweaking it until you get it... It takes time, clearly something he wont take...
Regardless, to say it's not possible is incorrect. In fact, not only is it possible, it's actually pretty straightforward if you know some basic trig and have some understanding of how to work with meshes.
The math is not that hard. I did it years ago for Amiga. Now I'm lazy enough to buy a plugin on the asset store for 5 bucks.
Sorry but it comes with UE4 as a primitive that you can utilise in the game engine... is a bit of a broad statement to make that is not actually part of an engine because Unity does not supply it.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
iPhone game with free Unity? 1 Answer
Where Can I Download Pre-made 3D Models? 14 Answers
change to glow texture on mouse click 0 Answers