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..

Re: Drag map with OculusVR

Hello.

Yes it is possible.
Unfortunately, I can not make an example for you, because I do not have OculusVR.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Drag map with 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?

Re: Drag map with OculusVR

Example of attached.

I hope that I understand correctly what you wanted.
If you mean something else, please describe it in detail.

Post's attachments

Attachment icon ChangePositionUsingGyro.cs 1.25 kb, 141 downloads since 2016-07-09 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Drag map with OculusVR

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"?

Re: Drag map with OculusVR

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

Post's attachments

Attachment icon ChangePositionByCenterPoint.cs 1.79 kb, 155 downloads since 2016-07-11 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Drag map with OculusVR

Thank you Alex for example and tip. Have a nice working day smile