Hey Fuseman really liking your videos. I was trying to modify your bow game to aim with both controllers instead of just parenting it to one but I’m having a problem with the rotation. Currently, I have a script on the bow that sets the position and rotation to the left controller when there is no arrow attached, so it functions as if it were parented. Then, when an arrow is attached, it will set the position, but the rotation is set to LookAt the right controller. I also have to rotate the bow since LookAt makes the bottom of the bow point toward the right hand.
All of that is working, but my issue is tilting the left hand side to side no longer rotates the bow, which breaks the immersion. I’ve tried setting the bows Z axis to the controllers z rotation and it rotates, but it doesn’t follow the controller close enough and still breaks immersion. The bow also flips around sometimes when you aim up or down.
Any ideas on how to do this the right way?
I personally have not tried doing two handed aiming, but according to Devon’s comment (seems to have gotten buried on the video), he seems to have figured it out. Here is what he said:
The core logic is:
bow.transform.rotation = Quaternion.LookRotation(bowHand.transform.position – arrowHand.transform.position, -bowHand.transform.forward);
My script/variables are pretty different than in the video (don’t just copy/paste that code into ArrowManager!). I have unparented the bow from the left hand and I’m handling position/rotation in the Update() function of a new script. The specifics of that line took me forever to figure out so hopefully it helps someone!