Vector getting transformed by blackboard?

Hi,

Somehow a point (vector) I randomly obtained inside a BT Task is getting transformed when I store it in the Blackboard. I would like to know why this happens.

For debugging purpose I draw a line from my Pawn’s current location to this randomly obtained point. If I draw this line before I store this point in the Blackboard, I get the yellow line. If I draw the line after storing this point in the Blackboard and getting it back from the Blackboard, I get the red line.

The consequence of this is that if I use this vector to move my Pawn before the vector gets transformed, the Pawn moves along the yellow line. If I use the vector to move my Pawn after the vector gets transformed by the Blackboard (in another BT Task for example), it moves along the red line.

Jesus! You are right! How did I miss that?! Promoting the return vector to a variable should solve the issue. Thanks! I guess I really need some sleep XD

Hello

Here is what is happening with you vector issue. Every time the “Random Reachable Point” node is referenced, it draws a NEW random point. By this I mean, when you call “Set blackboard value” it grabs a random value and sets it, then when you call draw debug line, it calls another random value to draw the line. An easy solution will be to have a vector variable “Random Point” that calls “Random Reachable Point”, then you reference the variable when ever you need it.
I hope this is helpful.

Thanks,