Jump to content

AI Pathfinding question


tipforeveryone
 Share

Recommended Posts

I use Entity:GotoPoint() on my AI character. It moves perfectly from point A to point B

If my player controller stands between A and B, this AI character will push it.

If I set my character mass greater than AI's , AI character will be stuck a bit and take time to "slowly" move around my cylinder physic shape.

 

How can I make my AI move around my player character properly when using GotoPoint ? I need him to avoid my player character's position.

 

I am sure that I can't use world:BuildNavMesh() every frame for this kind of pathfinding...

Link to comment
Share on other sites

I thought we had avoidance with pathfinding before?

I don't know smile.png I did not see any post before, can you show me please?

You can try getting vector between AI and player and then add a bit of force to the normal.

I think a small force will help him get around your collider quicker.

Good idea, but I want this AI avoid me completely biggrin.png like this

post-16833-0-67391300-1489166946.jpg

Link to comment
Share on other sites

The navmesh updating in those video is using small levels. For a Leadwerks terrain this is probably to heavy. However you can do patch updating which is possible in the C++ version. I will try to find an example from 2 years ago.

 

Ironically this exact same discussion was held 2.5 years ago: http://www.leadwerks.com/werkspace/topic/10911-pathfinding/page__st__20#entry79870

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...