[VR] Make a bow follow the 'holding object' AND look at the 'string pulling hand'
Right now I have the bow's location parented to the holding controller and I'm using this:
bowobject.transform.rotation = Quaternion.LookRotation((holdingController.transform.position - mimic.transform.position));
to make the bow rotate with the nocking controller.
Since I'm inexperienced with Quaternions I don't know why but the bow always stays in a perfectly straight upwards angle as seen in this short devlog here: https://www.youtube.com/watch?v=E3uQOm_YPa8
I want to make it so that the bow rotates with the holding controller but still adjusts it's rotation according to the nocking controller's position.
Answer by degrees · Jul 23, 2016 at 12:57 AM
Probably posted this question a little too early. I did some more research on Quaternion.LookRotation and realized that you can specify an upward vector. After I assigned the holding controller's upward vector to the upward 'slot' it worked 100% exactly like I wanted it to.
controllerUP = rotController.transform.TransformDirection(Vector3.forward);
bowobject.transform.rotation = Quaternion.LookRotation(rotController.transform.position - mimic.transform.position, controllerUP);