Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by kodagames · Nov 21, 2012 at 03:06 AM · transformparentchild

How Do I Offset a Childs Transform?

How Do I Offset a Childs Transform?

If I create an Empty GameObject and drag and drop for example a capsule to be the child object of the Empty GameObject. Why when I move the child object around the parent (Empty GameObject) takes the childs transform position? When I mention Move I mean literately not by code.

I cant seem to offset the transform of the Empty GameObject so that its at the bottom of a Capsule(child)? Its soo strange I was always able to do this in Unity before but Im thinking something has changed

My question is How do I put the Empty GameObjects transform at the bottom of the capsule (right now its always going to the childs center)?

Im using Unity 3.5.6f4

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
0

Answer by Democre · Nov 21, 2012 at 03:35 AM

Are you saying that if you

  • create an empty game object at 0,0,0

  • drag a capsule onto it as a child

  • move the capsule around

  • then select the empty parent

you then see the parent at some other position than 0,0,0 ?

The gizmos usually show at the center of all drawable object in that hierarchy (in this case only the capsule is drawable), but the parent's position should not change.

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
avatar image
0

Answer by XienDev · Nov 21, 2012 at 06:56 AM

http://docs.unity3d.com/Documentation/ScriptReference/Transform-localPosition.html

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
avatar image
0

Answer by kodagames · Nov 22, 2012 at 09:26 PM

The parents position did not change when I followed your steps no matter where I put the child object (200 in Y) if I focus on the parent it will always goto where the child is.

The gizmos usually show at the center of all drawable object in that hierarchy (in this case only the capsule is drawable), but the parent's position should not change.

I guess this is really throwing me off because in the past I could see where the parents transform (gizmo) is, now it just seems to, like you said goto the center of the drawable object no matter where I put the child.

Ahhh... My apologies, I finally figured it out. I couldn't figure out why my follower capsule was going into the floor it seems it was in my code.. Doh! not because of the transforms but because of a line of code that needed to be deleted. target = GameObject.FindWithTag("Player").transform; Problem solved. I seriously appreciate your responses it did help :)

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 Democre · Nov 23, 2012 at 12:43 AM 0
Share

can you mark my answer please?

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

11 People are following this question.

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

Related Questions

Make a simple tree 1 Answer

Separate child rotation 1 Answer

Assign parent object to target 2 Answers

Parent object is getting generated why ?? 1 Answer

How do I make a transform on a Child (added by script) apply to that Child instead of its Parent? 0 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