Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.

Align to surface normal

Hi! I am developing with holotoolkit, I am placing object with SpatialMappingObserver, SpatialMappingManager and WorldAnchorManager like managers, and the objects I want to place they have "TapToPlace"

My cuestion is: When I am placing one object, this object is face to face with camera and works nicely with spatial surfaces, that is OK. But the thing I want to do: When the object (for example a plane) touch a wall, I want this plane aligns with the wall normal.

I cant find the script for this. When I run microsoft app and I am positioning the window, this window works that I am asking for. I want for my scene planes. I appreciate the help!!
Regards.

Answers

  • Hi @gomes

    I think basically you just want to set your transform.up vector to match the normal of the surface you are putting it on. The spatial mapping mesh might be a little noisy to use directly; using plane finding would be better. There is some good discussion here though it isn't HoloLens specific.

  • Thanks for your help, my problem is that I dont know how and where catch this spatial surface for acces to his normal.

  • GazeManger.Instance.Normal will give you the normal of the surface that your gaze intersects with.

  • I think I know what you want. Use serfacemeshestoplanes script, generate planes in your environment, then place objects on those planes. You can get some help from holograms 230. (Placeable script)

    Hey, I'm a Microsoft Student Partner and a Mixed Reality Project Manager at a game development studio. I'm here to inspire and get inspired. Cheers.

Sign In or Register to comment.