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 GameGuy · Apr 07, 2011 at 01:21 PM · rotationpositionparentchild

How can I identify a non-uniform scaled mesh, and fix it?

Uhhmm sorry Unity Heads I forgot to include the code for rotation ;) ,now I have and also a link to a UnityProject with a Problem Demo(see below)!

I have problems with a rotation on an imported mesh in a deep child structure.

A parented mesh should rotate with its parent but keeps facing up the Y Axis, I do this by having a simple script like...

function Update(){ 
// 
transform.up = Vector3.up; 
}

...and the code for the rotation is:

function Update(){
//
if(Input.GetMouseButtonDown(0))
    transform.Rotate(0,0,90);
}

...this is no problem the rotation works like it should, but the position of the child is changing in an unwanted manner(not holding parents position).If I remove the script the position is where it should.

So I swapped myMesh with a standard Unity Cylinder, and the position problem disapears. My first thought was it is a non-uniform scaled mesh, and I exported it again.

Same problem with the position, then I checked(more than once)...

  • Pivotpoints
  • MeshScale
  • Different exportformat(.obj, .fbx)
  • put mesh in an emty GameObject

...with no effect.

If it is a non-uniform scaled mesh how can I 100% identify it, or what could it else be?


I build a little project to demonstrate the problem.

The project has two Scenes one with MyMesh where the problem occurs(MyProblemScene), and a Scene with a UnityMesh(MyWorkingScene).The rotation is done via Left Mouse Button.

Download the project: Fast Files - Free File Hosting

File Name: RotationTest.rar

File Description: Unity3 3ProblemDemo

File Size: 157.77 KB

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

1 Reply

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

Answer by GameGuy · Apr 08, 2011 at 04:55 PM

The Autodesk FBX Converter fixed my rotation problem, I had never bevore such problems with my imported meshes in Unity. In this forumpost I found the answer.

For all with the same problem check out the FBX converter :

http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775855

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

Where to find original unity Parent/Child script? 2 Answers

How can I make a First Person Character Controller a child of a moving platform without it affecting the rotation of the Character Controller. 1 Answer

Make a simple tree 1 Answer

Behave like another object is parent? 2 Answers

Camera follow ball along cylinder 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