Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Move camera #102
Place your entire environment inside a scene tag, and any transforms (
With this, you can control rotation and movement from within React, but keep your users comfort in mind. Users in VR headsets shouldn't be moved too quickly through a scene, or it could induce motion sickness.
@vineethariharan Scene is no longer supported, since it creates too much confusion around local vs world coordinates.
The best way to manipulate the camera's position is to implement your own CameraController: https://github.com/facebook/react-360/tree/master/React360/js/Controls/CameraControllers. These are how the camera's orientation and position gets manipulated each frame, through clicking and dragging, scrolling, moving your phone, etc.
If you don't want to implement one, there is another approach. You can call
In general, it's better to move the world around the camera, than to move the camera itself. This will especially become important once standalone 6DoF headsets make it onto the market, and users can really walk around your space.