HI all,
I'm trying to integrating cardboard to the AR/VR following this 'How To':
HI all,
I'm trying to integrating cardboard to the AR/VR following this 'How To':
if (Physics.Raycast(cameraGaze, out hit)) { if (hit.collider.name=="Video") { //trigger video play funciton here? } }
The Video Playback sample allows the user to start a video by touching the screen at a location that intercepts the video mesh rectangle;
this is done in the sample code by casting a ray from the camera (viewer) into the 3D scene along the direction of the vector defined by the touch location on the screen; the sample code uses standard Unity ray picking API.
In a Cardboard setup however you won't be able to use the screen touch, cause the device is inside the viewer; in this case you need to define a suitable strategy for your user experience;
for example, you could use a "gaze pointer" similar to the one used in the AR-VR sample; when you look at the video rectangle and the pointer is hovering it, you can trigger the video playback; the AR-VR sample code shows how to trigger an event when the "VR" notice (the 3d label) is intersected by the gaze ray; see the GazeRay.cs script in the sample code; you would need to adjust that code to start the video, instead of triggering the transition from AR to VR (for example)
Attachment | Size |
---|---|
![]() | 191.65 KB |
The lens area for both left and right eye are so narrow,...
1. As discussed already in other threads in this Forum, the eye viewports with the AR video background are smaller than the available screen area because the field of view angle of the device camera (and so the width of the video background rectangle) is smaller than the field of view used by Cardboard ( a typical device camera field of view can be in the range 50 to 60 degrees, whereas Cardboard field of view is set to about 80 degrees).
So, the AR rectangle can only cover a subregion of the entire view; note that forcing the video background to cover the entire screen would result in a magnified ("zoomed") and stretched view with respect to what the real device camera is seeing and would lead to inconsistent visual experiences.
So, what you see (shown in your screenshot 1.PNG) is the expected result. When you wear th cardboard viewer, the visual experience should be correct, despite the viewports being smaller than the screen.
How to remove the back-arrow on the top left of the screen?
2. The back arrow at the top of the screen is simply controlled by a Cardboard setting, which you can toggle ON and OFF, which you can find in the Inspector of the CardboardMain.
when I click the 'Settings' and back to camera...
3. The Cardboard Vuforia integration guide provides a section "Additional code changes to handle the Cardboard settings Dialog on iOS"; note that the instructions refer to the Cardboard version 0.5.0
Is it possiale to add VideoPlayback on a ImageTarget under this AR/VR Integrating environment, and use VRButton to play it?
4. Yes, you can reuse some of the code from the Video Playback sample and create an App that does that; as far as I can tell, there's nothing that should prevent you from achieving it
I still can not make video playback in Mixed Reality sample, could someone show some demo to me? please.