VR - Gaze - LineTraceByChannel not following my camera

Hey there!

I’m trying to create a gaze system, so that I can later look at a particular object and trigger an event.

This is my blueprint:

My problem is that when I start the project, the line trace doens’t start on the camera/my face… it starts and stays on the floor… no matter where i look to or go… it stays in the same place.

Does anyone know how to make the line trace follow your camera on VR?

Thank you!

Found the solution.

Instead of triggering this on tick, I was triggering it on Event Begin Play.

Make sure you have this running on tick and it will work.

1 Like

Hi! I am trying to do something similar to this and I was wondering where this blueprint was created? Is it created in the VRPawn (self)?

1 Like

Hey!
This particular setup in this project, had the code inside the VRPawn’s blueprint.

Although, in many other instances and contexts, I was able to recreate it using a separate blueprint, the only thing i needed was the proper references for the VRPawn.

Thanks for reaching out!