I’m having the same issue. In BTS_BotDetectPlayer I am doing a Single Line Trace from the Bot to the Player - however I have to reverse the logic to get the expected state: StartNode=Player and EndNode=Bot & the result is the Bot to cast a line that ends at the player.
I’ve verified this by printing to the screen (to double check the world positions) and spawning a projectile at the hit/reading the hit . Definitely working backwards but I can’t understand why. For my BP_mainplayer I have another SLT that works as it should so that I can shoot bots. Not sure why one works correctly and the other I have to setup back-to-front
Exactly my point. If you see my screenshot (in-game) the only way I can get the Bot to see my player and have the raycast end at the player (as proven by the spawning of the explosion) - is IF I set them up the wrong way around. Makes no sense.
Update: So I came here looking for why it seems to be going back-to-front and it found the OP of this question saying his seems to be back to front as well. Maybe there’s a bug in UE4 for certain situations?
Yep correct on all fronts. The spawn was just to double check it really did end at the player (despite the End:being set at the bot). The spawn location is the hitactor output
This service runs every tick and is the check to see if the enemy/bot has detected the player. The line trace gets done once the player is within a specific radius (to check if they’re visible / obscured). At the moment I have both parts of the branch going to the raycast (since I want him to do it all the until this issue is fixed).
This setup works almost as intended (the bots navigate the environment in a Patrol state until the radius + raycast logic allow them to see the player). The bot then switches to a Search state and will continue coming after the player until it gets close enough to trigger the Attack state. After that, distance between bot/player will allow the bot to go back to Search.
I had the forward vector logic before and had the same issue with it running backwards. Will set it again and do some screengrabs
The cast is not the wrong way but just hitting something as soon as it spawns
The green line means something has been hit and that’s the the length the full trace would’ve had. To fix this make a new array for the “Actors to Ignore” and add the reference from your cast and you should be all good.