- Home /
Duplicate Question
Create custom shapes in unity3d
Hello, I'm making a 3D Tetris game and I was wondering if there is an option to create a custom shapes in unity? I thought about to build a "Cube Factory" that creates by random each of the Tetris cube. But I don't see how to create (programming) in unity a custom shape for each shape in unity. is there any tutorial of how to do it or the best way is to create a model in softwares like blender or maya and etc and then importing those models and to add them to gameObject in unity?
Answer by tanoshimi · Nov 29, 2014 at 07:10 PM
Unity is a game engine. To model 3D shapes, use a 3D modelling tool (Maya, Blender, 3DS Max...)
yeah ok.. but i was wondering if there is a way to create tetris shapes in unity by code
Yes, it is possible. Look into $$anonymous$$esh Generation by script. You can create any kind of model purely by code, it is what all the $$anonymous$$inecraft cones do as well. You basically create a list of Vector3s that define the vertex positions, create triangles from these vertices, and then assign these values to the $$anonymous$$eshFilter. UVs and Normals optional.
Follow this Question
Related Questions
Locomotion - 'Custom' Button missing? 0 Answers
Cloud recognition in Vuforia 0 Answers
Model importing from 3d max to unity 1 Answer
Cubes collide with terrain 1 Answer
Make inspector show changes of class variable value in function? 1 Answer