joseph.howell Posted August 29, 2016 Share Posted August 29, 2016 Hi, Vive does not appear to work correctly. We created the default world in the browser. Then we ran the program. Everything in our world that is at 0 z appears to float approximately 1/2 meter above the ground. You can see this by looking at the safe-zone grid. Everything at 0 floats about a foot above the grid. We discovered we could still move the camera up and down, so we figured that the location of the vive must be relative to the camera position. We tried a camera position of 0,0,0, and everything was still too high off the ground. So we tried editing different camera parameters, and we found it had very strange results. Putting anything positive into the y put the objects in the scene approximately 1 meter into the ground. Putting 0 into the camera y put everything about 1/2 meter above the ground. Finally, after a lot of trial and error, it seems like if we put the camera at 0,0,0.00211f, then it finally lines up our 3D world with the Vive world correctly. You can verify this problem by creating the default world. Add in a 1x1x1 meter box and raise it so that it rests on the floor (instead of being buried half way in the floor). Now make the box 2 meters tall. Start the app. Notice that when looking at the box, you're looking at the top of it. Unless you're really, really tall, you shouldn't be able to do this. Now lay down on the floor, you should be looking right at the floor but note you are still floating above it. Thanks Code: int init() { // Write here code to be called on world initialization: initialize resources for your world scene during the world start. Player player = new PlayerSpectator(); player.setPosition(Vec3(0.0f,0.0,0.0f)); player.setDirection(Vec3(0.0f,1.0,0.0)); engine.game.setPlayer(player); return 1; } Link to comment
silent Posted August 30, 2016 Share Posted August 30, 2016 Hi Joseph, We don't have such issues with our sample in SDK Browser -> Samples -> UnigineScript -> App -> app_vive_00. Camera is set to the (0,0,0) - everything is working as expected. Could you please check if this sample is working correctly in your environment? Other 3rd party HTC Vive demos are working correctly in your case?Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
joseph.howell Posted August 30, 2016 Author Share Posted August 30, 2016 Yes, we confirmed app_vive_00 works ok. We then noticed that app_vive_00 uses a PlayerDummy and we are using a PlayerSpectator. We switched to using a PlayerDummy and it works great. Any reason why a PlayerSpectator isn't working with vive? Link to comment
silent Posted August 31, 2016 Share Posted August 31, 2016 Hi Joseph, PlayerSpectator is roughly can be described as a sphere with certain radius (no physics, but with collisions based on BoundSphere). Probably, because of that collisions you have deviations in real height. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
joseph.howell Posted August 31, 2016 Author Share Posted August 31, 2016 Ah ha. Right. We had turned physics off in our other apps but forgot to turn it off here. Link to comment
Recommended Posts