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
-1
Question by Michael 1 · Mar 15, 2010 at 08:09 PM · transformrotateparent

Model rotation and hierarchy of game objects - not rotating!

Hi all, I'm new to unity3d but have programmed 3D apps before. I have a hierarchy like this:

Player

  • body
  • shorts
  • shoes

Player, body, shorts, and shoes are all GameObjects. Player is used just as a container and is the parent of the other parts. Each of the children has a Mesh and a Mesh Renderer. I am trying to rotate the entire player so I thought I could just modify the rotation of the Player transform. I can see the y-value of the rotation changing in the inspector when I run my script but the 'model' does not rotate. I can't understand why this doesn't work.

Am I missing something unique to unity? Thanks

Comment
Add comment · Show 5
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 Lipis · Mar 15, 2010 at 08:12 PM 0
Share

It would best if you could post the snippet of the code when you are trying to rotate your object..

avatar image Michael 1 · Mar 15, 2010 at 08:34 PM 0
Share

void Update() {

}

avatar image Michael 1 · Mar 15, 2010 at 08:35 PM 0
Share

Here is the Update in the script:

void Update() { transform.Rotate(0,45 * Time.deltaTime, 0); }

The script is a component of the 'Player' object.

avatar image Michael 1 · Mar 15, 2010 at 08:53 PM 1
Share

Solved! I rebuilt my hierarchy and re-added all of my meshes and it just worked like I thought it should. Not sure what went wrong the first time.

avatar image Lipis · Mar 15, 2010 at 09:04 PM 0
Share

@$$anonymous$$ichael as it should in a first place.. so you might want to remove the question since it's probably a bug.. :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Jaap Kreijkamp · Mar 15, 2010 at 11:12 PM

The player has an animation that modifies rotation and position of the object itself, so the animation overrides any changes you make. The solution, make the player a child of another gameobject and do moving, rotation on this one.

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

No one has followed this question yet.

Related Questions

Parent an objects position without its rotation 1 Answer

making one object a parent of another via javascript 2 Answers

How to rotate without a target vector 1 Answer

Orientation Vs. Rotation: How do I specify more than 360deg rotation for a quaternion, in the editor? 1 Answer

Why does transform.Rotate( x, y, z ) work correctly but transform.Rotate( Vector3.forward ) does not? 1 Answer


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