HoloLens user position - hololens

Is there a way to get the position of the HoloLens user? I want to send the position of user back to PC and then update my hologram accordingly.
Is there a way to do so? I haven't been able to find any API using which I can send back user's location to my computer.
We can use the initial position and orientation of user as origin and then calculate everything relative to it.

Camera.main.transform is the position of the head.

The best way to do this would be to use the HoloToolkit-Unity. You end up adding a prefab called "HoloLensCamera" to every HoloLens project. The starting position and rotation for the root GameObject of HoloLensCamera are always 0,0,0. As you move around, the values of position and rotation are updated relative to your movement.

The HoloLens create start position, it's 0,0,0.
He can't give you a longitude/latitude value because he don't have a compass !

I recommend you to check sharingwithUNET in holotoolkit-unity or now Mixedrealitytoolkit-Unity. If you run app in the unity and also run the same app in the hololens you can see the location of the both app users. One you can control in unity and another is the location of the hololens user. When you move with your hololens you can see it updates the location in the app on computer in unity. I'm not sure if this is exactly what you need but I'm sure it will help you out if you check how it works.
Good luck!

Hololens hasn't any API for getting altitude and longitude. All camera positions would be relative to initial.
You should choose the another way. Find any noticeable item at any wall (or floor, or sail). Attach Spatial Anchor to the item. And calculate positions to the anchor. Then share the anchor to all Hololenses in the room.

Related

Is it possible to add moving icon in google earth tour

I create a path in google earth and create the animation by google tour function.
But I also would like to add the icon (such as arrow or car) moving along the path during the tour.
Is there any simple way to achieve this?
The way to create an icon that moves along a path, and turns to face the direction it's currently moving, is to use a "KML Track". It's easy to create a Track from GPS data (gpx file or otherwise) via the GPS import tool in Google Earth Pro. Then you can add a custom icon if you wish. Once you have that track animating the way you want, you can add it to your Tour.

Blender : Some objects disappear when I turn to camera mode (it's not the snapping I think)

OK... here is the thing...
I am modeling a Star Wars Cruiser.. I'm doing pretty fine, but.. whenever I look through the camera, half of my ship disappears ?! Now you might think it's the clipping, but that doesn't make sense, since the clipping is set to 0,1 mtr - 10.000 mtr, which should be more than enough. Besides that, the clipping is the same for both the visible and now disappeared objects...
Does anyone have any clue ?
I also tried to change the Local view to Global view.. but no dice...
Here is a screenshot in not-camera view :
And here is one in camera view : i.imgur.com/XaxAHIN.png
I'm using Blender 2.82
Please let me know if you need more info or even a link to the model...
OK, I got some help from a friend... Joshua Rooijakkers from the Netherlands...
He fixed the problem in seconds...
So ... it WAS the clipping.. the setting was just buried somewhere I didn't look...
Thanks Josh ! :-)
Objects disappear in camera view modeWhile setting up my camera with the camera lock to view option selected, I noticed that on switching on to the camera view, the object had disappeared.
I tried zooming in and out, but that did not work. I exited the camera view and then selected the object in the outliner and then tried zooming in and out and then panning down and adjusting the view in the view port. I could see that the object was now visible and that the camera was positioned below the object. That was because the camera was added wrt to the position of the cursor which was snapped to the world origin. I a sure many would have encountered such issues.
I then selected the camera to ascertain its position. Then by using the grab tool, I moved the camera along the Z axis just above the object and then switched to the camera view and selected the lock camera to
view option to adjust the camera view to the desired position.
This helped me locate my object in the camera view. Do let me know in the comments if there are other ways of dealing with this.

A hologram is offset in a screenshot

I use Vuforia to recognize a tag and put a hologram above it. I want to take a screenshot with that. But the hologram is displayed in the wrong place on the screenshot, although I see it in the right place through HoloLens.
What is the reason? How can I correct it?
This happens because the camera is not in the center of the HoloLens but, rather it is over the right eye. Therefore any pictures you take with the HoloLens will be slightly offset.
If you are using Mixed Reality Capture (MRC), for good alignment you have to make sure that the focus plane is set at the hologram depth as discussed in the link above. Here is some information on how to set it in Unity https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/focus-point-in-unity

Add Lines To Google Earth Using KML

So, basically, I'm trying to figure out a way that I can draw lines (say, representing the flight path of an RC plane or something) onto Google Earth using KML. Here's the kicker though: I want to give it an initial location, and then check somewhere to see where to continue drawing the line to, draw the line, and leave it be. Once it's done, I could then move it around.
Ex:
Starts at a point A in google Earth
Checks File XYZ.kml on //someserver
XYZ.kml has updated coordinates to draw to
Google Earth pulls in those coordinates and extends the line
Repeat 2->4 until complete
View completed flight path from 3rd person.
Does anyone have any ideas on how to do this? It seems like it can change the location of a model or something in this fashion, but you would have to watch it first person. I haven't been able to figure out how to get this particular functionality to come out right.
You have a few ways of doing this, here is just 2.
Create a LineString via a networkLink and then use the Update feature to update your LineString (ie replace with new version)
Create a LineString and then use .getCoordinates().pushLatLngAlt() to build upon it.
Edit: Sorry, as pointed out in comments, Option 2 is for GE Plug-in, not standalone version
See this SO question for some help on using option #1
See this SO question for more info on option #2

Annotation in UIWebview in iphone sdk

I need help for, scribbling on the webpage i.e where ever the user moves on the uiwebview there it should draw a line according to the touch moves.
Is this possible.
Can any one please help me in this.
Thanks,
Mrudula.
yes it is possible just you have to write uiWebView.scrollView instead of uiWebView for getting coordinates of uiwebview.
I started working on something sort of like this. It doesn't currently let you "draw", but it does let you detect and record relative touch coordinates so that you can scale them correctly when zooming in. The DSAnnotationView object lets you provide a custom UIView to be toggled at the annotation point. Check it out here: https://github.com/justindarc/WebViewAnnotations
-Justin

Resources