Forum rules - please read before posting.

Collision cube

Hi,
how can i make my player stop in front of objects with collision cubes.He is not walking through the object but walks on in front of the object on the same place.Would be great if someone could help me.Thanks.

Comments

  • Which combination of pathfinding and movement methods are you using?

    If Unity Navigation and Point And Click, you probably just need to re-bake your navmesh.
  • Hi,
    yes i use Unity Navigation and Point and Click.I tried to solve the problem but my Player still doesnt stop in front of walls.Collision detection works because my player doesnt walk through the wall.He is just not stopping in front of the wall.
    Thanks for help.
  • Have you got your walls marked as static, specifically "Navigation Static"?

    If problem persists, screenshots might be useful - like those shown in the official docs:

  • When using point and click movement, you should rely entirely on your NavMesh for movement - collisions and CollisionCubes should be left alone, as the two systems conflict.

    Try reducing your Agent Radius value in the Navigation tab, as this will increase the distance between the NavMesh and surrounding walls.
  • Hi,
    i tried both of your hints.Walls are Navigation static and i reduced Agent radius.It still doesn't work.
    Thanks for further help.

  • Very hard to see anything from those screenshots!  However, it looks like your baked NavMesh is hugging the walls tightly.  The player will try to position themselves along the edges, but won't be able to if the walls have colliders.  Try increasing the Agent radius instead.
  • Hi,
    thanks a lot.It solved the problem.|
  • Hi,
    it did not solve it 100 percent.He stops but now it looks like he is running into the wall,hovering a little bit.Thanks for help. 
  • Have you removed the wall colliders?  New screenshots to illustrate what's happening exactly will be needed.
  • Thanks it works.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.