Announcement

Collapse
No announcement yet.

How to check if actor cannot move to Target point?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to check if actor cannot move to Target point?

    I have dynamically spawned actors (in RTS mode) that move to 5 different waypoints on the map. They also generate the navmesh thing dynamically because you're going to be building stuff around these actors. However, I would like to know how check if those actors cannot reach a target point, so that I could deny the player's ability to build on that certain spot.

    So basically, if you want to build something that blocks the path of the actors to the target point, then give a prompt error like "You cannot block the path." eventually, not letting the user/player build there.

    Thanks.

    #2
    I guess you would have to put an imaginary footprint of what will be there with its collision on and try a navmesh run there. If it fails, have it report back that it can't reach the destination and flag the item placer to No. I am not sure how you would do a navmesh run without the actor actually going there.

    Comment


      #3
      I've never tried these nodes but i think these are the nodes you are looking for.

      Attached Files
      Support my RTS Game (Agora) on Patreon!
      Unreal Nexus - Create Share and Experience!
      Unreal Engine 4 World-Wide User Map

      [PLUGIN] Aws Gamelift Client Plugin
      [TOOL] Create your own binary release of UE4 from GitHub source
      My UE4 Tutorials and Misc Tools

      Lead Programmer at YetiTech Studios
      Your Friendly Neighborhood
      Satheesh PV (a.k.a RyanJon2040) | Twitter, Instagram, Facebook, LinkedIn, YouTube, Google+

      Comment


        #4
        Originally posted by ryanjon2040 View Post
        I've never tried these nodes but i think these are the nodes you are looking for.

        Yes, it's those 2, thanks, I got it working now .

        Comment


          #5
          Can you share how you got it working? What i'm doing is spawning the object and then checking the path but IsPartial is always returning true even if the path isn't being blocked

          Comment


            #6
            Weird, I tired the FindPathToLocationSynchronously where the location is in a NavArea_Water (NPCs are excluded from this area.). What I want is the isPartial to be true but it's always false.
            Could you share how you got it working? I am still not sure what the Pathfinding Context means.
            Originally posted by c0ldpr0xy View Post

            Yes, it's those 2, thanks, I got it working now .
            Thank you very much.
            My Programming Blog

            Comment

            Working...
            X