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 jamesar · Aug 29, 2013 at 09:56 PM · c#collisionphysicsrigidbodynavmeshagent

Why can't my enemies walk up an incline?

Hey all,

I was hoping someone could provide some insight to a problem I am having in my game. Currently I have my enemies spawning throughout my scene, and I have a bridge that links the two sides of my scene together. On this bridge there is a slight incline on each side and it seems as though my enemies are unable to walk over it. Right now my enemies are setup as navmesh agents; on them I have attached a simple box collider that wraps around their body, as well as a rigid body component with gravity enabled. I assume the problem may have something to do with the baked navigation settings, or the actual navmesh agent. If anyone has run into a similar problem I would really appreciate some advice.

Thanks!

Comment
Add comment · Show 6
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 Matthew012 · Aug 29, 2013 at 10:05 PM 0
Share

Can we see code? It hard to know what you did wrong without seeing it.

avatar image jamesar · Aug 29, 2013 at 10:22 PM 0
Share

Honestly, there isn't much code to show. I can attach a picture of the prefab if you would like, but the navmesh agent takes care of all of the enemy's movement.

avatar image s_guy · Aug 30, 2013 at 06:56 AM 0
Share

First discern if it's a physics problem, a navigational problem, or an input problem (do they even want to go to the expected destination). Provide evidence of one or the other and give some info about what debugging problems you're having.

avatar image TonyLi · Aug 30, 2013 at 01:43 PM 0
Share

Can you provide a screenshot of the navmesh? Does the blue navigable area cover the incline? For example, in this screenshot the blue area covers the main floor as well as the two raised bars, meaning that the main floor and the raised bars are all navigable. Thin areas sometimes don't get marked navigable. To fix this, you need to make a finer mesh.

alt text

avatar image jamesar · Aug 30, 2013 at 07:32 PM 0
Share

It does appear to be a physics related problem. From what it looks like in the editor, once the enemies reach a certain part of the incline on the bridge, their box collider collides with the bridge and prevents them from moving any further. I will attach a screenshot of my navmesh to this comment. Thanks!Screenshot

screen shot 2013-08-30 at 12.26.29 pm.jpg (163.3 kB)
Show more comments

1 Reply

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

Answer by meat5000 · Aug 30, 2013 at 11:14 PM

I think its why upright characters normally use Capsules. The corners of your box could be getting stuck on the incline?

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 jamesar · Aug 30, 2013 at 11:31 PM 1
Share

Alright, so after some trial and error, and with some helpful hints that put me in the right direction, it did turn out that my problem was due to the box colliders that I had attached to my enemies. When they began to walk up an inclined plane, their box collider would collide with the ground and prevent them from moving forward. Unfortunately for me, using a capsule collider is not really an option, so I ended up just decreasing the slope of my bridge for now. Thanks for your help everyone!

avatar image meat5000 ♦ jamesar · Aug 30, 2013 at 11:39 PM 0
Share

Here, I converted my Uber high level comment to answer so you can give me some thumbs up :P

avatar image jamesar jamesar · Aug 30, 2013 at 11:41 PM 1
Share

Thanks for your help! Don't have enough rep yet to thumbs up so I'll give ya the answer ;)

avatar image meat5000 ♦ · Aug 30, 2013 at 11:41 PM 0
Share

$$anonymous$$uch obliged :)

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

20 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

Related Questions

Is it ok to move objects with CharacterControllers not through their CharacterController and without adding a kinematic Rigidbody? 1 Answer

What is the best way to prevent a physics object from going through thin colliders? 2 Answers

Issue with adding force and lerping position? Possible unity bug? 0 Answers

Raycast doesnt detect object in front of rigidbody (player is stuck on wall) 1 Answer

How to change CC script to Rigidbody script 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