-
Notifications
You must be signed in to change notification settings - Fork 25
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
Need to find decent starting position #4
Comments
The starting position of the viewer is the same as a typical webgl default camera position.
let vrGlobals = {
counter: 0
};
function preload() {
createVRCanvas();
}
function setup() {
setVRBackgroundColor(200, 0, 150);
}
function draw() {
fill(0, 255, 0);
checkSync();
vrGlobals.counter++;
translate(0, 0, -10);
strokeWeight(0.1);
box(5);
}
function checkSync() {
if(vrGlobals.counter === 0) {return;}
if(vrGlobals.counter !== frameCount) {
console.error('Out of sync!');
}
} This example places a box on the negative z axis. So when the user first goes to VR mode, the cube will be directly visible to the front just by moving the head up and down (the head should be facing front perpendicular to gravity). The movement of head up and down from starting position will allow aligning the viewer's forward vector along the -z axis. |
Right I understand. My main concern is whether every frame the camera should be shifted in the z-vector. If I draw a sphere at 0,0 then where do I expect that to be in relation to my body to most effectively match the experience of WebGL mode on the screen. This isn't a technical question as much as a question of design and achieve a good 'feeling' out of the box for the user. |
As we discussed, how do you feel about giving user the capability to specify starting position or interestingly, let the user decide the viewers position at any point? The api for this could be very similar to p5 camera or maybe we can attach a viewer to a perspective camera? |
Definitely! Do you want to propose one or two methods? |
Currently there is a call to
translate
in the draw loop of most of the manual tests that positions the viewer in a location that I just attempted to make 'feel okay'. This is wrong. The todo here is to figure out what translation feels natural enough so that example sketches from non-immersive p5 sketches look okay from the beginning. This translation should then be accounted for automatically by the library. ThexrFrameOfRef
itself may need to be modified.The text was updated successfully, but these errors were encountered: