• 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 MorbidDesign · Feb 09, 2018 at 09:52 AM · navmeshdeformationagent

Cylinder deformed when using NavMesh

Hi there.

I've just started to use the Navigation system and I'm having a curious problem that I cannot resolve.

I've created a baked area over a plane (just the plane, not the child objects). Then I've added a cylinder as a plane's child:

alt text

But when I press Play, the Cylinder gets deformed when it begins to move towards the destination:

alt text

I have tweaked with Agent Radius in both Agents and Bake menus, but the cylinder still gets deformed when I play the scene.

Any help would be appreciated!

cylinder-in-scene.png (67.8 kB)
deformed-cylinder.png (48.7 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
1

Answer by Harinezumi · Feb 09, 2018 at 10:40 AM

This looks like the issue of non-uniform scaling:
- https://answers.unity.com/questions/222018/rotating-an-object-distorts-it.html

Does your cylinder or any of its parent game objects have all the same values in the scale of their Transform component? E.g. (1, 1, 1), or (2, 2, 2), or even (3.1415, 3.1415, 3.1415). If not, upon rotating the object it will get distorted.
Btw, it is unrelated to navmeshes. As Bunny83 explains in a comment, it is due to distortion of space.

Comment
Add comment · Show 4 · 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 Bunny83 · Feb 09, 2018 at 11:32 AM 1
Share

ps: This is not a "Unity issue" but a simple fact about linear transformation and parent-child relations. When you distort space don't be suprised to get something distorted ^^.

avatar image Harinezumi Bunny83 · Feb 09, 2018 at 11:36 AM 0
Share

O$$anonymous$$, thanks for the explanation. I will update the answer to reflect this.

avatar image MorbidDesign · Feb 09, 2018 at 12:07 PM 0
Share

Hi guys, thanks for your answers.

These are the Transform values I'm managing:

World (parent object): 1, 1, 1 Street (first child): 6, 0.8, 1 NPC (cylinder, second child): 1.6666, 1.25, 1

But why it only gets distorted when following a Nav$$anonymous$$esh path? If I remove all navigation system, it looks fine.

avatar image Harinezumi MorbidDesign · Feb 09, 2018 at 12:16 PM 0
Share

Because it deforms when you start rotating, and the NavmeshAgent rotates your object when moving. You can check that this happens if you manually rotate your object.
$$anonymous$$y recommendation is to make the NPC have a scale of (1, 1, 1), and create a model that fits the size (1.666, 1.25, 1).

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

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

Related Questions

NavMeshAgents with same variables acting differently 1 Answer

How to queue NavMeshAgents on entering a tile in Unity (based on path distance to tile)? 0 Answers

NavMeshAgent collision not working with player 2 Answers

Randomize NavMeshAgents path finding with same destination 1 Answer

NavMesh Agent rotation problem 3 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