- Home /
Create Building Level like Sims
Hey guys, I'm pretty new to Unity3d (few months), so I know a good amount of basics.
So far when I create an object like a cube or sphere, its just defined by a transform. I have no way to specify that I want to do something with one face of the cube or one corner of the cube.
I want to start making prefabs like doors and windows, but I need to know how to specify the side with the 'hinges' so that players can piece together game objects appropriately during their gameplay like building a house in Sims, where good match is green and inappropriate match is red.
Can you guys give me the general idea of what Classes to use or whatever so I can start to research it??
You don't really use unity to modify models. There are other programs for that. Like $$anonymous$$aya or 3ds$$anonymous$$AX or Blender or whatever. Just use a rectangle for a door until you have a proper door model.
Now as far as specifying the hinges and whatever, you don't really need to do that. When writing code, just assume that hinges are always on the right (and model your door so that they're on the right), and that the door always opens in one direction. Now if your player wanted the doors to open in the opposite direction, you should give them tools to rotate the model 180 degrees around the Y axis.
The $$anonymous$$esh class contains information about vertices of your object, but I think it will be quite complex to use for what you want to achieve.
http://docs.unity3d.com/ScriptReference/$$anonymous$$esh.html
truly, thank you guys for the information. I will start looking into those things right away :)
Answer by Tony_T · Jun 22, 2015 at 09:23 AM
I'm using a really useful add-on to manipulate walls and stuff. It helped me save lot of time. Check the link, as for the windows and other models, you can create some models with this add-on like door frames, stairs but don't imagine anything crazy. If you want more advanced models you should use other programs (3DS Max, Maya 3D, Blender, etc.)
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Instantiating Objects on the Sides of Other Objects 1 Answer
Snapping a picked up object into a slot/space 0 Answers
Optimize Objects 1 Answer
What's the best way to snap an object into position? 1 Answer