- Home /
The question is answered, right answer was accepted
How to grab and rotate objects in VR by SteamVR pointer
Heyho nice people :)
I am currently trying to figure out, how to grab objects with simply pointing at them with the SteamVR Laser Pointer and pressing a button or smth to attach it, so I can rotate it by controller rotation like its working when directly hand-grabbing an object.
Thereby I dont want to change position of an object while rotating.
Does anyone know how this can be accomplished? I am very new to Unity and VR, so much advice and help is needed ^^
Thank you so much :3
Answer by edthered1009 · Apr 25, 2019 at 11:35 PM
So, you want to change the rotation, but not the position? You could set the GameObject's rotation to that of the controller's, and not touch the position at all.
I guess I found a way,
I am setting my controller as a Parent, so I have a correct rotation in every direction, doesnt matter from where I am looking at the object. And while Im rotating, I am freezing the position of the object :)
Thank you for your advice :)
What? When parenting an object, the object's position is also parented to that of the parent. I think it would be easier to get a reference to the controller and set the object's rotation to that of the controller's.
Follow this Question
Related Questions
Face Direction Movement using CharacterController 1 Answer
Daydream controller visual final build problem 0 Answers
MMD How to export model and animations to Unity as 3rd person controller? 2 Answers
Rotate object based on another rotation above a certain threshhold 1 Answer
Player Arm will not rotate when moving with Xbox Joystick 1 Answer