Topic: Drag map with OculusVR
Is there a possibility to drag texture map on a plane by using raycast and a button (like space)? Hold with button and drag the map with head movement then release the button for example..
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → Drag map with OculusVR
Is there a possibility to drag texture map on a plane by using raycast and a button (like space)? Hold with button and drag the map with head movement then release the button for example..
Hello.
Yes it is possible.
Unfortunately, I can not make an example for you, because I do not have OculusVR.
In fact you don't have to have an OculusVR. In an Android 3D project could you drag the map with raycast? If so, can you explain the way to fallow? How can i use raycast point and a keyboard button instead of mouse and mouse button?
Example of attached.
I hope that I understand correctly what you wanted.
If you mean something else, please describe it in detail.
Thank you for your interest. You understand what i want but i don't want to use gyro data to move map. I want to use :
Ray ray = camera.ViewportPointToRay(new Vector3(0.5F, 0.5F, 0)); //Middle of camera viewport
Physics.Raycast(ray, out hit)
hit.point; //as positon
and use hit position to move map by holding space to drag. Is there an easy way to do this or should i change all "Input.mousePosition" to "hit.ponit"?
Example attached.
This example requires Online Maps v2.4.0.51+.
We found and fixed the minor problems that relate to this example.
Please update Online Maps through the built-in update system.
Hold «Left Control» to move the map. If you want to use «Space» or another button, you can easily modify it.
Another thought:
Example uses GetCoords, that works in Screen Space.
If you want to get the coordinates by World Space, use OnlineMapsTileSetControl.GetCoordsByWorldPosition.
http://infinity-code.com/doxygen/online … 1b58011257
Thank you Alex for example and tip. Have a nice working day
Infinity Code Forum → Online Maps Help → Drag map with OculusVR
Powered by PunBB, supported by Informer Technologies, Inc.