How to set vector as null?

While using “value as vector” for setting variable for blackboard, it asks for a vector value which is by default 0,0,0 for x y and z.

But here i need to reset it to null. but i dont know how to give it a value which is null or unset it?
how can i achieve this…??

Only object can be set to null which in Unreal it is called “None”, use boolean to help, make it struct if you find it better to use.

You can decide on a value that would not be realistically used in your game (such as 0,0,-9999) as your null and check if the vector is equal to that with a branch node before going on.

sorry! still i dont understand what i need to use…??

Read below

Agree we need this especially in behavior trees where we can only check if a blackboard vector is set or not. There is no way to unset it.

Hei, I was searching for this and ended up here. So even though it’s a bit late, this may be useful for someone.

You can use Clear Value on the blackboard. For use in behavior trees I made a tiny helper task blueprint, derived from BTTask:

Note that Blackboard Key is a public exposed variable so it becomes available in the task’s details panel, in the Behavior Tree view.

1 Like

If anyone is stressed out because they want to check if a vector is valid in BT, use Is valid AILocation node. This works for me.