I'm trying to do a navmesh. Everything seems to work fine exept that my character in almost completely under the ground. The ground is a plane with a mesh collider. I have baked it and checked my heigth mesh. My character has a rigidbody and a collider. What could be the problem ?

enter image description hereenter image description here

  • \$\begingroup\$ can you send a screenshot from your problem and Inspector settings? \$\endgroup\$ – Seyed Morteza Kamali Sep 9 '19 at 12:48

make your rigidBody Kinematic as navmesh and navmesh-Agent does not need physics to navigate your agent. make sure you object is grounded and be near of navigation mesh surface.

  • \$\begingroup\$ I already tried making it kinematic, no change. And would it still use gravity ? \$\endgroup\$ – Samuel Fyckes Sep 9 '19 at 21:30
  • \$\begingroup\$ @SamuelFyckes change base offset and height of your agent. that will be okay. \$\endgroup\$ – virtouso Sep 9 '19 at 21:55
  • \$\begingroup\$ Thanks, it aactually worked, but now gravity dont affect him, I cant even move him on the yaxis on runtime. \$\endgroup\$ – Samuel Fyckes Sep 9 '19 at 23:21
  • \$\begingroup\$ Also, doesn't seems like he want to jump on blocks, scale of 1 and i tried changing the obstacle height he can jump to other numbers \$\endgroup\$ – Samuel Fyckes Sep 9 '19 at 23:29
  • \$\begingroup\$ @SamuelFyckes it all depends on your design. you shouldnt handle all functions on one object. most of the time navigation is on a base parent object then character model and animations are on a sub object. if you want physics it should be handled in sub object. an object cant be handled wit physics engine and transformation both \$\endgroup\$ – virtouso Sep 9 '19 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.