The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Hologram Placement is off, I know something is missing, but what?
I am trying to position and match a hologram with its real-life counterpart, so it sit right on top of object. I want to set and anchor the hologram there, allowing me to visualize more 3D content on the real object (like upgrading the armor on an object)
I modified the HologramPlacement.cs script and added code to set the Anchors. But when I tap on the object to "set" it down in the real world it does not stay correctly. I am not able to walk around the object as it will continually move and be however far it was when "set" down
Best Answers
-
OptionsHoloSheep mod
@vcastelo you should try the TapToPlace script from the HoloToolkit.
Here are the basic steps involved in creating a new app from scratch.
Note a little further down in that thread that it is also important to see the capabilities to include SpatialPerception.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings5 -
OptionsHoloSheep mod
@vcastelo the TapToPlace is basically just moving the objects position.
Initially you set the objects position in the Unity Editor and when you run your app the object appears at that position.
The first Air Tap sets the move flag to true.
// On each tap gesture, toggle whether the user is in placing mode. placing = !placing;
When the move flag is true, the objects position gets set each update cycle to the position where your gaze intersects with the special mapping.
// Move this object to where the raycast // hit the Spatial Mapping mesh. // Here is where you might consider adding intelligence // to how the object is placed. For example, consider // placing based on the bottom of the object's // collider so it sits properly on surfaces. this.transform.position = hitInfo.point;
The second Air Tap sets the move flag to false.
// On each tap gesture, toggle whether the user is in placing mode. placing = !placing;
The update routine stops changing the objects position, so it gets left at the last place in the spatial map that you were gazing at.
HTH
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings5
Answers
@vcastelo you should try the TapToPlace script from the HoloToolkit.
Here are the basic steps involved in creating a new app from scratch.
Note a little further down in that thread that it is also important to see the capabilities to include SpatialPerception.
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings
Thanks HoloSheep. Will try this and get back to you.
Hi HoloSheep,
Okay that worked, and even when I replaced the cube with my own 3D model, it stayed in place where it was set. Looking at the TapToPlace code I do not see any anchors associated with the "modelBase" go. How does this work? Is it due to the spatial mapping only? and if so is it mapping itself which aligns the coordinate system of the 3d space and the physical space?
@vcastelo the TapToPlace is basically just moving the objects position.
Initially you set the objects position in the Unity Editor and when you run your app the object appears at that position.
The first Air Tap sets the move flag to true.
When the move flag is true, the objects position gets set each update cycle to the position where your gaze intersects with the special mapping.
The second Air Tap sets the move flag to false.
The update routine stops changing the objects position, so it gets left at the last place in the spatial map that you were gazing at.
HTH
Windows Holographic User Group Redmond
WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings
Thanks again Holosheep. I think what I was missing was the initial position being set in the editor wherein my application it isn't.
@HoloSheep
i try the TapToPlace script from the HoloToolkit. with all initial step. but i cant move object i checked on hololens simulator.
Did you try on real device?
In emulator got to tools > Room. Clear Room and Load some new room and try again.
(You can also modify script so that you can see spatial mapping grid all the time, and when you start application in emulator, if grid does not show, you need to load room)
@Xarthisius
Thanks.