Topic: Any tips for HoloLens?

I'm trying to figure out how to pipe input from the HoloLens to Online Maps.  We can do things that are obvious gestures: double click to add markers, etc.

But the part I'm struggling with is being able to drag markers around.  I can't for the life of me get Online Maps to detect that I'm grabbing a marker.

I've seen the intercept input example and I'm trying to use that.  But I think the problem I'm having is that despite using a "hold" gesture event with the hololense as the "number of touches" and various different attempts at the input position (ranging from center of the screen to gesture event positions and rays) but nothing has worked so far.

Any suggestions?

Re: Any tips for HoloLens?

Hello.

To start dragging a marker, you need to set OnlineMapsControlBase.dragMarker.
Example:
http://infinity-code.com/atlas/online-m … ample.html

To get the marker on the screen position, use OnlineMaps.GetMarkerFromScreen or OnlineMapsControlBase.GetInteractiveElement.

P.S. Unfortunately, we do not have HoloLens to make an example of what you want.

Kind Regards,
Infinity Code Team.

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

Re: Any tips for HoloLens?

I've only got the hololens emulator myself (req. Win10), wont have any hardware until next week.  I know how to set the dragMarker, but not how to get the marker.

Based on my experimentation yesterday, the actual viewport the hololens gives you does not correspond to any camera in the Unity scene.  Firing a ray from the center of the main camera (which is where the hololens at least initializes its view) returns nonsense when applied to the map: that is, the ray never impacts the map geometry at all!

I had to completely replicate the functionality of GetMarkerFromScreen that took in an arbitrary ray (the hololens API was giving me a worldspace ray that corresponded to the user's head and gaze) which only worked after some trial and error (as I was having to continuously test one step at a time using 3D text to display the debug data with 6-8 minutes between runs, due to the double-compile required plus the hololens OS bootup time).

The other problem is that there's no good way to "drag the marker around."  I've essentially tied into the NavigationEvent (which is equivalent to an analog joystick: the farther away from center--where the navigation event was initiated--the faster the scroll rate, but it also means that scrolling can continue without actually changing the input parameters).

Its super clunky. I was hoping there might be some alternative you--or someone else--was aware of.

Re: Any tips for HoloLens?

Hololens situation update.

I've been having an issue running the project in the emulator (and confirmed yesterday that it happens on the device as well).

Here's the interesting bit:
I created a fresh Unity project (on 5.6) and started toying around with hololens development free of the existing project.
No issues compiling and running.
I imported Online Maps (that's it, I did not attach it to a game object) and bam, I get the crash I've been having a problem with.

Any insight? I know we've stuck our fingers into the Online Maps scripts and messed with stuff, but nothing that should be running as soon as the application loads without being attached to an object in the scene. We're talking "crashes before the Unity splash screen displays" level early.

Re: Any tips for HoloLens?

Hello.

I read your dialogue with Unity.
This is a pretty interesting.

At least two things seemed strange to me:
1. That problem occurs in ScreenPointToRay. This is a very unexpected place for the problem.
2. That the problem does not gone after the removing of Online Maps.

When splash screen starts to show, your application is already working.
When it hidden, the application will already draw more than 100 frames.
Any unhandled exception will crash the application.

We've seen this behavior before when we started to make support for WSA.
An exception in ~5-10 frame (in another thread), crashes the application before splash screen shows.

Kind Regards,
Infinity Code Team.

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

Re: Any tips for HoloLens?

The removal of the assets might not have fixed the issue due to compiling to the same output directory: that is, there may have been a lingering file from the presence of the map assets. When I rebuilt to a brand new folder then the issue went away again.

But yes, it is definitely interesting.

I didn't know that the application ran behind the splash screen. That's news to me, thanks.

Re: Any tips for HoloLens?

Hey Draco18s,  did you get the "intercept input" example working with the Hololens?   I'm able to get OpenMaps loaded in the Hololens without any problems, but I can't figure out how to drag to update the Map location.  Z input (From the Intercept example) works in the emulator but I need it to work with an Air Tap.