VR headset Pawn/AI Tracking

For working with EQS or AI, sometimes it is easier to make dummy blueprint actor, and tell AI to follow it instead of real goal. Then that actor can snap to real actor location (usually update on tick and just copy transform over and apply to self). This way i can have single EQS for bots, instead of branching and following different targets.

So to follow VR camera I made BP_marker that reads VR camera location and snaps to it:

  • make BP_Marker, that is just empty blueprint
  • in it on event tick find player pawn, cast to your player pawn class
  • get camera reference, get its world transform
  • save that in variable inside BP_Marker
  • set transform for SELF to stored value (inside BP_Marker)

Make bots follow BP_Marker