Character head turn towards player in VR

Ok, at get world location of look at point, I get x:2420, y:3471, Z:31.4.
At forward vector: x:0.8, y:0.5, Z:0 (this number is the same if the print string is after normalize as well)
at actor location: x:2500, y:3420, Z:6.4 ish

Also attempted something different:

With this the bird smoothly looks toward me when I’m on the right side, however when I switch to the left it snaps back to the right again. The string values from the center to the right, start at 0 then go to about -45. On the Left, they switch instantly from a positive 1 or low number back to a negative (-300ish). Since the yaw is between 90 and -90, I would think that I should have negative values on one side, and positive on the other right? Yours is showing all positive on the Z, and mine is showing mostly all negative.

Thanks, I did enter these manually and plotted it in paint and it is valid so then I add the corrds in my world and it still works for me :sweat_smile:

Try this it should work: sometime you got tinker and I not able to with your project but this is omni and is -90 to 90 when in front.

THIS WORKS. The shift range did not work, and instead kept the yaw at a constant value of 90 or -90. But bypassing it works. The head smoothly looks from left to right when I look at each side. The look at point also does not work (with and without the shift range), but calling directly to the camera does.

1 Like

Your bird breaks all math books. :laughing:

I think it’s the camera/VR aspect. I’m sure if it was a 3rd person to 3rd person it would have worked fine with the first solution.

I just created a vr project and its half pi based or pre-shifted in VR
the front Yaw ranges -90 to 90 and the TP runs 0 to 180

So that’s good to know was driving me crazy

VR breaks all the math books :slight_smile: Most my time it trying to do something simple that works fine in non VR applications. Thanks so much for your help!

1 Like