Announcement

Collapse
No announcement yet.

Exposing Perception functions to Blueprints

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

    Exposing Perception functions to Blueprints

    Hi,

    is it now possible to use
    Code:
    IAISightTargetInterface
    ,
    Code:
    CanBeSeenFrom
    and
    Code:
    GetActorEyesViewPoint
    in Blueprint ?
    I found tutorials where the latter can easily be overwritten with C++, but in my case I can't even add a C++ class inside my project. Everytime when I try to add a C++ class I can't open my project anymore. Making the players head visible can also be done in BPs, but it would be probably a faster and more elegant way to just expose this function to BPs...

    So it would be pretty cool if these functions were exposed to BP....(or are they and I am just completely blind...?)

    #2
    Code:
    GetActorEyesViewPoint
    Is already exposed on any Actor.
    Code:
    CanBeSeenFrom
    is not exposed probably because it is called on update.

    Comment


      #3
      GetActorEyesViewpoint just returns the actor origin unless you override it in a c++ base class. There is a really great tutorial about this on YouTube. But no matter what you do, you really can’t get more than basic functionality from the perception system without some c++.

      Comment


        #4
        Originally posted by Nerdsbeware View Post
        GetActorEyesViewpoint just returns the actor origin unless you override it in a c++ base class. There is a really great tutorial about this on YouTube. But no matter what you do, you really can’t get more than basic functionality from the perception system without some c++.
        unfortunately (and as I mentioned it in the init post) I can't add any c++ classes without breaking my project. I should have created a c++ project instead of a blueprint project back then. I would need to start all over again and create a c++ project....
        That's why I would highly appreciate if these basic functions would be exposed to BPs, to shift the AI's perception and make him react to the player's head easily and directly.

        Comment


          #5
          Nothing should prevent you from adding source code to a Blueprint Project and making it into a C++ Project. There is no need to start over.

          Comment


            #6
            Every time I add a C++ class and then try to reopen the project, I get the message "..could not be compiled. Try rebuilding from source manually..." . (I updated Visual Studio 2019 Community few days ago) Also can't convert my BP project to C++ project...

            Btw: Would I still get access to all the C++ functions even inside a BP project ?
            Last edited by User345546056; 06-15-2019, 08:07 PM.

            Comment


              #7
              Originally posted by User345546056 View Post
              Every time I add a C++ class and then try to reopen the project, I get the message "..could not be compiled. Try rebuilding from source manually
              You need to generate the solution files and open the solution in Visual Studio and have VS compile your project.
              Originally posted by User345546056 View Post
              Would I still get access to all the C++ functions even inside a BP project ?
              Yes.

              Comment

              Working...
              X