Forum Discussion
klimenko.georgij
8 years agoMember
How to throw objects in unity with oculus go controller()?
Hi, everybody!
I am trying to be able to throw objects in Oculus Go game. So far, I reached the point where I can drag and drop objects(with rigidbody obviously), and even read angular velocity from the controller in order to give natural rotation to the object, but I have no idea how to read velocity from go controller and give this velocity to the object to emphasize actual throwing.
There is a video on youtube where the guy (Ben Roberts) explain everything regarding oculus input : https://www.youtube.com/watch?time_continue=9&v=mFFta9OszzA . This guide is really good. He uses such line of code to read velocity from the controller: objectinHand.GetComponent<Rigidbody>().velocity = OVRInput.GetLocalControllerVelocity(controller);
(to prevent possible confuse, "objectinHand" is my own variable, just change it to one that was in the video).
Unfortunately, this approach doesn't work for oculus go controller.
So, in this case there is a question, how to read velocity from the go controller and recreate natural throwing of the gameobject?
I am trying to be able to throw objects in Oculus Go game. So far, I reached the point where I can drag and drop objects(with rigidbody obviously), and even read angular velocity from the controller in order to give natural rotation to the object, but I have no idea how to read velocity from go controller and give this velocity to the object to emphasize actual throwing.
There is a video on youtube where the guy (Ben Roberts) explain everything regarding oculus input : https://www.youtube.com/watch?time_continue=9&v=mFFta9OszzA . This guide is really good. He uses such line of code to read velocity from the controller: objectinHand.GetComponent<Rigidbody>().velocity = OVRInput.GetLocalControllerVelocity(controller);
(to prevent possible confuse, "objectinHand" is my own variable, just change it to one that was in the video).
Unfortunately, this approach doesn't work for oculus go controller.
So, in this case there is a question, how to read velocity from the go controller and recreate natural throwing of the gameobject?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 4 years ago