Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by eheimburg · Mar 31, 2010 at 03:34 AM · editorterrainpositioningplacementhotkeys

Placing items on terrain in the editor

Hi, this has got to be an easy newbie question but I can't figure it out. I want to drag and drop entities from my Project into my scene, and have them show up on my terrain. But instead they show up some 100000000 miles away from the terrain object, and I have to manually pull them around for ten minutes until they sit on the terrain in the right spot. How do I get Unity to drop my stuff on the terrain? Or barring that, is there some way to say "put it where this other thing is"? I am having a really hard time positioning objects efficiently.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by Eric5h5 · Mar 31, 2010 at 04:06 AM

If you drag objects into the hierarchy view, they will appear at 0,0,0. If you drag objects into the scene view, they appear some distance in front of the scene camera. You may therefore want to position the scene camera so that objects will appear in more convenient places. Also, if you hold down shift+command (shift+control on Windows) and drag the middle of the object, it will snap to the surface below.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image eheimburg · Aug 23, 2012 at 03:34 AM 0
Share

(To update a two-year-old question:)

Another related newbie thing to know is that if you use the mouse wheel to move the editor camera, it DOESN'T actually move it. It just zooms the view in or out.

If you drop an item into the scene, it always appears just a bit away from the camera. But if you're zoomed way out, that may SEE$$anonymous$$ very far away. The fix is to zoom in with the mouse wheel.

(It would be nice if there was a way to see your current zoom level, but I haven't ever found it.)

avatar image krazymaggy25 · Oct 19, 2015 at 07:58 PM 0
Share

i tried this and it didnt work :<

Blockquote

avatar image
3

Answer by twobob · Sep 29, 2014 at 07:13 PM

 using UnityEngine;
 using UnityEditor;
 using System.Collections;
 
 public class AlignWithGround : MonoBehaviour {
     [MenuItem ("Tools/Transform Tools/Align with ground %t")]
     static void Align () {
         Transform [] transforms = Selection.transforms;
         foreach (Transform myTransform in transforms) {
             RaycastHit hit;
             if (Physics.Raycast (myTransform.position, -Vector3.up, out hit)) {
                 Vector3 targetPosition = hit.point;
                 if (myTransform.gameObject.GetComponent<MeshFilter>() != null) {
                     Bounds bounds = myTransform.gameObject.GetComponent<MeshFilter>().sharedMesh.bounds;
                     targetPosition.y += bounds.extents.y;
                 }
                 myTransform.position = targetPosition;
                 Vector3 targetRotation = new Vector3 (hit.normal.x, myTransform.eulerAngles.y, hit.normal.z);
                 myTransform.eulerAngles = targetRotation;
             }
         }
     }
 }
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlexTuduran · Jan 20, 2019 at 08:21 AM 0
Share

@twobob That came really in handy, thanks!

avatar image
0

Answer by JimNix · Mar 31, 2010 at 04:01 AM

An easy way to do this, is just to position your terrain at x=0, y=0, z=0. Then when you import a new object into your scene just type in the transform (position) box, 0 for each x, y and z co-ords. Tip: Once the object is placed at 0, 0, 0 press F, to quickly focus on it so you can move it around your terrain faster.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Terrain Tree Placement 0 Answers

Tree color variation 0 Answers

Remove Trees during runtime 1 Answer

Make a simple tree 1 Answer

How to raise a block from a Terrain 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges