Making a BP node

Hello All

Can some one please point me to a lesson or explain how to make a BP node in C++?

My problem is, I have AI that do a dive tackle to subdue the player but if the AIPerception sight is set to 90 degrees when they tackle and they miss tackle and go past the player they stand up with the player behind them cause they can’t see the player anymore they go back to patrolling.
So what I would like to do is set the angle to 90 degrees as normal but once the player has been sighted change it to 180 degrees then after miss tackle the AI will turn around and pursue the player again but when line of sight to the player is lost set the angle back to 90 degrees.

BP’s has no node to change AIPerception Peripheral Vision Angle Degrees, but I think this can be done form C++, at leased I hope so if not that’s is really sad.

So I’d like to make my own BP node to change this setting, or maybe some else has made one already.


Isn’t it possible to compare the rotation of the two actors? As the Perception follows the rotation af a component/actor AFAIK?

sorry are you saying I should make the AI do a full revolution before walking away, I tried it but could not get it to work nicely, I’ll give it another try. It would be much easier if I could change the vision angle at run time. The setting is there EPIC just hasn’t give us run time access, why maybe they just haven’t got round to it yet and it’s really low on their list or changing the value at run time causes other bugs.

If it should be humanlike, maybe look left and right before leaving, since this should only be a rotation of 45 degrees to each side to reach a view of 180 degrees, with a 90 degrees cone (2*45+90 = 180)
But i can see your difficulty of creating a constant 180 view that looks natural.