2
\$\begingroup\$

I want to create a plane that will be normal to the Z axis, but I am having difficulty visualizing what rotation it needs to have.

I want to have a top-down view upon the plane such that I can use the X and Y coordinate system for position, and the Z axis for height.

It seems intuitive for me to point the camera in the same rotation as this plane, and give it an orthogonal view and a positive Z value (and set gravity to have a negative Z value), but I seem to be fighting against the grain and running into more issues than I should be, so I would like to ask what rotations I should be using for this.

What rotation should I use for the plane? can the camera share the same rotation? (assuming I want the top to be +y and the right to be +x as seen from the camera.

\$\endgroup\$
3
  • \$\begingroup\$ Would you mind accepting an answer? I hate to leave questions in an "unfinished" state. \$\endgroup\$
    – Pip
    Commented Mar 15, 2015 at 14:53
  • \$\begingroup\$ @Pip there really needs to be a way to view one's "unanswered" questions across the entire SE network... \$\endgroup\$ Commented Mar 16, 2015 at 2:29
  • \$\begingroup\$ Definitely! It's super annoying when I realize that I never accepted an answer for a question, even when it has had answers for months. \$\endgroup\$
    – Pip
    Commented Mar 16, 2015 at 11:26

2 Answers 2

4
\$\begingroup\$

Luckily for you, you don't actually have to deal with any of this! Instead of actually creating a top-down world, you can use Unity's built-in 2D mode, and create sprites instead of cubes and planes, to make it look like it is top down. 2D mode makes the camera line up automatically, and have the depth appear to be non-relevant, though it is. Also, there are already a lot of utilities, both from Unity and in the asset store, for things such as drawing certain sprites on top of others, if you don't want to draw them based on z-depth. Keep in mind that collision and things like that will be implemented a bit differently in 2D, but that should not be a huge problem if you have experience with 3D. Finally, if you need some help or suggestions, you can always visit the learn section of the Unity website!

In addition, if you have your heart set on using 3D models for some reason, you can create a plane in 2D mode, and rotate it around it's x-axis by -90 degrees. Note that the rotation is negative, as the plane only has one visible side, which is not shown when the rotation is positive. The default main camera (I am not sure of the others) will automatically line itself up with the plane, if it is in 2D mode, which is very convenient.

\$\endgroup\$
2
  • \$\begingroup\$ Unfortunately I am looking to use existing 3-d models that I have them at times have them "use" their 3-d abilities (think of doing a back-flip or a barrel roll) \$\endgroup\$ Commented Sep 6, 2014 at 21:11
  • 1
    \$\begingroup\$ In this case, you can actually still use 2D mode, but don't have to utilize the sprites. The models will work perfectly fine, and as long as you set their minimum z-depth to before the background or whatever you are using, they will have no problems \$\endgroup\$
    – Pip
    Commented Sep 6, 2014 at 21:18
1
\$\begingroup\$

For that orientation you described you want to use the following Euler rotations:

//Camera     (0, 0, 0)
//Plane/quad (0, 0, 0)

In this setup the x value will move the object "East" and "West". The Y position will move it "North" and "South" and the Z value will be "Altitude".

It is worth noting that the coordinate axes in Unity are different from some 3D modeling programs. (Y-up vs. Z-up) So its worth checking your import settings because that can cause some confusion especially if the models have come from different sources.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .