dsman Posted January 15, 2018 Share Posted January 15, 2018 For the normal camera, we can have bounding mesh which has collision enabled and that way we can restrict camera movement to the certain area. But the WebVR camera is free and doesn't respect the collision, So how to restrict the movement of the user in the model? Note: This is not about Room Scale and guardian system. This is about restricting camera movement including teleportation to a certain area inside VR. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 15, 2018 Share Posted January 15, 2018 You can restrict teleportation to a set of meshes by specifying the name of the floor mesh or a list of meshes: addTeleportation() has a parameter vrTeleportationOptionshttps://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/VR/babylon.vrExperienceHelper.ts#L670 You can add/remove meshes on the fly with addFloorMesh(mesh) and removeFloorMesh(mesh). What about attaching (parenting) a bounded mesh to the camera to restrict movement of the user? GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
dsman Posted January 17, 2018 Author Share Posted January 17, 2018 @brianzinn We have our own implementation of teleportation etc and not using vrExperienceHelper. (We did it before vrExperienceHelper was introduced). We could do same in our implementation (having floor meshes or teleportation enabled meshes) but the problem is we have secondary navigation which works with joystick and that can't be limited that way. Can't ellipsoid based camera collision on webVRCamera be possible like it does in free camera? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 17, 2018 Share Posted January 17, 2018 This is still possible. Nothing prevents it The WebVR camera IS a free camera. You should be able to move it with a gamepad for instance if you call camera.inputs.addGamepad() 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.