Game Development Reference
In-Depth Information
of the FBXImporter so that every time that prefab is placed in a scene it
is already at the right size. Additionally, by making sure this is the right
size on import, it keeps the work flow smooth and the size of everything
constant if the project ends up inherited by another artist or scripter.
Tips and Tricks
Scaling of objects is often a battle when working between 3D applications.
Generally, 1 unit in Maya is 1 unit in Unity. So if your tool of choice is
exclusively Maya, making a 2-unit-tall stand-in guy in the Maya scene will
allow for good scaling in Maya as the scene is built. Still, the FBXImporter's
Scale Factor will need to be changed from its default 0.01 setting to 1.
However, when working with a team, especially a team working with
various 3D applications, scale gets all funky, and getting used to adjusting
the Scale Factor is just a part of the process.
Tips and Tricks
When adjusting the scaling, it can be tough to find the right size. Look for
areas that allow for good comparisons, like doorways. If the First Person
Controller is moved over to a spot like a doorway, it can be easier to figure
out the appropriate size.
Step 9: Fall through the floor. In the Toolbar, press the Play button. There
will be one glorious moment of seeing the scene and then “you” (the First
Person Controller) will start falling, and falling, and falling until the Play
button is pressed again. This is because by default the EntryWay prefab
has no colliders so it doesn't stop things passing through it.
Why?
Colliders are important components of GameObjects in Unity. They do just
what their name implies—they register collisions. A collider may be the exact
shape of a polygon mesh (called a Mesh Collider ) but they can also be more
basic shapes like cubes, spheres, and capsules that approximate a shape.
Calculating collisions is a nontrivial function and if allowed to get out of
hand can drag a game to a standstill. We recently were developing a bomb-
defusing tool and had used Mesh Colliders on a complex bomb mesh. In
the game, whenever the First Person Controller got anywhere close to the
bomb, the frame rate would drop to 2 or 3 frames a second. All the hundreds
of little components in the bomb with Mesh Colliders was just too much for
Unity and our machines to calculate. The solution for us was to remove the
Mesh Colliders and place Box Colliders on just the elements the player was
to interact with. Suddenly, the frame rate was back up to where it should be.
Because of problems like this, Unity does not assume that the meshes that
are imported are all using the accurate but intensive Mesh Colliders. In
Search WWH ::




Custom Search