I have a "Player" which travels around a track, and a camera that is parented to that. My shooting mechanism traces a ray from the camera center in the direction the camera is looking. It works great if you want to use the camera direction to aim. However, I am trying to get the Oculus Go hand controller to also help aim.
The "Player" never rotates, but the camera (parented to the "Player") does.
this works when the game starts, with the aiming direction being a combination of the look direction and the hand controller direction but the firing direction gets off as the player turns around.
I have also tried not adding the camera direction to the hand controller direction: Vector3 fwd = camTarget.transform.TransformDirection (targetForward);
Aim gets off again.
This is the code that works, but again only using the camera direction and ignoring the hand controller.