Noob question about correctly updating pawn variables from other bp's

I’m creating a little VR project for uni but I want to discourage walking through walls and objects and such so I created an Actor bp called SafeArea which is essentially 2 box collisions. Every tick a bool variable in the pawn’s bp gets set to false and the player’s location gets stored in a Vector variable but on overlap with the outer box collision, the bool gets set to true which stops the player’s location variable from updating (this variable is now the “safe location” where the player will be teleported back to when they hit the inner box).

The issue I’m facing is when there is more than one instance of the actor in the scene (in my case there are 2) and the player collides with one of the SafeAreas, the bool variable in the pawn gets set to true (link:collision with first box) as its supposed to but if I collide with the other one, it still reads false even though the second SafeArea bool value correctly updates to true (link: collision with second box). The reason why this is happening is because the pawn’s variable only gets set to the “first” SafeArea’s bool value.

I’ve got a feeling I’ve messed up somewhere and the solution is an obvious one that I’ve missed but I can’t seem to figure it out.

As you can see from the link: [blueprint] (, I’ve done more or less the same logic as checking if the player has hit the inner box and I have no issues with any of the variables updating there.

FYI the link for the blueprint allows you to zoom in/out and move around with RMB

this seems like a really odd way to go about things wouldnt basic collision be enough to negate the need for all of this? also i wouldnt be running all of this of tick since it could cause some slowdown. tick is every frame so you could be running this script 30-120+ times per second. you could easily call this on an event.

With basic collision, the pawn would stop when it hit the box but the user would still be moving which I think might be odd thats why I decided to do it this way. The aim of this project btw is to find ways to minimise motion sickness so I probably will at some point do basic collision for testing purposes

i assume your teleporting on a key press yes? why not try using a line trace to see if they can make it there before actually moving them. or you could do the trace and where it hit is the location they would teleport to. that would keep them from clipping in the first place.

Sorry probably should have mentioned…it uses point and click teleport using the motion controller. This is UEs template which does exactly what you said but I’ve added another type of movement which is walking in place (ie swinging your arms while stationary) this one goes through all objects. I’ve managed to add “collision” to the inner box so if I were to remove the logic for the outer box collision, the player would hit the object and be unable to move forward further, but like I mentioned earlier I thought it best to teleport the player to a “safe location”

if your using a walking motion then its not a teleport and if you have collision on your player it should all work out fine in that case.

Do you mean it should work fine as in my variables should be updating correctly or that the player should stop when hitting the collision?

they should stop when hitting collision if they are walking.

Agree, but I don’t want the player to stop when colliding, I want the pawn’s bool variable to correctly update so that they can be teleported back to safety. Any idea on how to get the pawns bool to read true when ANY of the SafeArea bools return true because as it stands right now it only updates to true when the “first” instance of the SafeArea is true and doesnt update when the second SafeArea is true

if you want a bool to read true when any input is true use a OR node.