Hello everybody. This is my first post. What I am trying to do is the following:
1.) Have a sphere (a marble) that is a rigidbody so I can have physics take care of collision with meshes)
2.) Using physics.AddForce to make the marble move forward, backwards, etc…
3.) CAMERA FOLLOWS THE MARBLE
4.) Adding Oculus Rift support —> After I figure out this logic
I have all the following working correctly but I ran into a snag. Player movement (forward, backward, left, right) work correctly. The camera is chasing the marble. But I need to be able to rotate this marble left + right. As the marble rotates I need the camera to rotate with it (so it always stays behind the marble at all times). Adding torque just rotates the object but doesn’t actually change its forward orientation.
Problem example:
you move player forward, then right. You find an obstacle. You can not negotiate it because you can’t really see all of it. (moving your head around with the Rift…). If you don’t stay behind the marble, your forward controller can quickly become left, or right, etc… You lose your orientation completely when in VR. I do not know how to apply a force vector to actually make it rotate. Any ideas, suggestions?