KramSurfer Posted July 28, 2018 Share Posted July 28, 2018 I'm attempting to move a WebVRFreeCamera camera around a scene, but setting it's position while in VR mode sees to have no effect. I've created a WebVRFreeCamera and a ExperenceHelper with the trackPosition option off. The WebVR emulator in chrome has no effect on the position of the camera, so that false value is applied. It is not parented to anything nor has children. Tracing the camera's position values in the render loop confirms changing position values, but the camera is not moving in the scene. Appears stuck at the origin. The playground exhibits the expected behavior. With the camera.y incremented before render, the camera should animate away. http://www.babylonjs-playground.com/index.html#00A2ML#9 Any Ideas welcome. I've spent ~5 hours already on this one issue Thanks Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 28, 2018 Share Posted July 28, 2018 Since you are using the experience helper, did you try: experienceHelper.currentVRCamera.position.y += 0.01 Edit - that's only going to have an effect when you are in VR mode. Check this code if you want to animate the movement: https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/VR/babylon.vrExperienceHelper.ts#L1485 Quote Link to comment Share on other sites More sharing options...
KramSurfer Posted July 28, 2018 Author Share Posted July 28, 2018 Yeah, that's it. Just came back to post this solution and now see your answer. ? Apparently when using the Experience Helper, the WebVRCamera is parented to the ExperienceHelper. brianzinn 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.