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.
Initialization of Holograms in scene
Hello everyone,
I'm looking for the script of Placeable.cs and SpaceCollectionManager.cs in the last HoloToolKit version.
I'm just starting in Hololens Development and I don't success to place my Holograms accordingly to my SpatialMapping. I do not have SpaceCollectionManager.cs or even Placeable.cs in my HoloToolKit and none of my classes have a GenerateItemsInWorld function.
I have the SurfaceMeshesToPlanes_MakePlanesComplete function in SpatialProcessingTest.cs (<=> PlaySpaceManager.cs in previous version of HoloToolkit). But don't know what I should do once I find my floors and walls to automatically place my holograms in the room (on the floor or against walls).
Thank you
Best Answer
-
Optionskeljed ✭✭
There is a script "TapToPlace.cs". You can attach it to any game object to move it around and place it on any surface.
/// <summary> /// The TapToPlace class is a basic way to enable users to move objects /// and place them on real world surfaces. /// Put this script on the object you want to be able to move. /// Users will be able to tap objects, gaze elsewhere, and perform the /// tap gesture again to place. /// This script is used in conjunction with GazeManager, GestureManager, /// and SpatialMappingManager. /// TapToPlace also adds a WorldAnchor component to enable persistence. /// </summary>
I had a strange issue with newly instantiated prefabs that shoud be moveable (IsBeingPlaced=true) from the beginning of their lifecyle. In the editor it works fine, but in the HoloLens the new objects didn't move. A quick workaround was to wait some milliseconds before setting the property to true. Then it worked like a charm.
5
Answers
There is a script "TapToPlace.cs". You can attach it to any game object to move it around and place it on any surface.
I had a strange issue with newly instantiated prefabs that shoud be moveable (IsBeingPlaced=true) from the beginning of their lifecyle. In the editor it works fine, but in the HoloLens the new objects didn't move. A quick workaround was to wait some milliseconds before setting the property to true. Then it worked like a charm.