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
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.

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

Navmesh and multiples floors 2 Answers

Nav Mesh Agent Type 3 Answers

Agent is going through walls set as non walkable 1 Answer

NavMesh does not working... 0 Answers

Reasons an NavMesh Agent.isStopped might be set to True? 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