New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move camera #102

Closed
Ahlid opened this Issue Apr 18, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@Ahlid

Ahlid commented Apr 18, 2017

Is it possible to move camera by x,y,z axis?

@andrewimm

This comment has been minimized.

Show comment
Hide comment
@andrewimm

andrewimm Apr 18, 2017

Contributor

The <Scene> tag allows you to transform the camera position.

Place your entire environment inside a scene tag, and any transforms (style={{transform: [...]}}) applied to the scene will instead by applied to the camera.

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.

Contributor

andrewimm commented Apr 18, 2017

The <Scene> tag allows you to transform the camera position.

Place your entire environment inside a scene tag, and any transforms (style={{transform: [...]}}) applied to the scene will instead by applied to the camera.

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

This comment has been minimized.

Show comment
Hide comment
@vineethariharan

vineethariharan Jun 27, 2018

Is this still relevant in r360? or is there an alternative?

vineethariharan commented Jun 27, 2018

Is this still relevant in r360? or is there an alternative?

@andrewimm

This comment has been minimized.

Show comment
Hide comment
@andrewimm

andrewimm Jun 27, 2018

Contributor

@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 r360.getCameraPosition() to get the raw camera position vector, and modify its contents.

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.

Contributor

andrewimm commented Jun 27, 2018

@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 r360.getCameraPosition() to get the raw camera position vector, and modify its contents.

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.

@vineethariharan

This comment has been minimized.

Show comment
Hide comment
@vineethariharan

vineethariharan Jul 3, 2018

So, I am creating a virtual room tour with a walk functionality. Would you suggest i move the room around or the camera in my specific usecase?

vineethariharan commented Jul 3, 2018

So, I am creating a virtual room tour with a walk functionality. Would you suggest i move the room around or the camera in my specific usecase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment