Game Development Reference
In-Depth Information
To move the sphere to the same location as the cube, you could copy and paste the values from the
cube to the sphere, but that would be tedious. Instead, you will be using a typical Unity workflow
where the target object is focused or framed in the viewport, then the object to move is moved to
that location. Note that it will not affect the object's orientation.
4.
Select the Cube in the Hierarchy view.
5.
Double-click the cube in the Hierarchy view, or move the cursor to the Scene
view and press the F key.
The Scene view zooms in to the selected object. Unity calls this action “frame selected.”
6.
Now select the sphere by clicking on it in either the Hierarchy view or the
Scene view.
7.
From the GameObject menu, select “Move to View.”
The sphere is moved to the center of the viewport as defined by the cube's location (Figure 2-8 ).
Figure 2-8. The scene focused to the cube, and the sphere moved to the scene's focus
8.
Select the cube, and check the Inspector for its Rotation values.
It should still have -60 (or whatever you left it at) as its Y Rotation value.
9.
Select the Sphere, and check its Rotation values.
The sphere was moved to the cube with “Move to View,” but its rotation was not changed.
Search WWH ::




Custom Search