Hello everyone.

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.
Options

Make an object stop when in contact with a wall

I have an object that i can use manipulation on and move arond with tap and hold. Right now the object is jumping around when i "press it" against the spatial mapping. I want to make it so that the object just stops when it comes in contact with the spatial mapping. i have tried a few different things with OnCollisionEnter but nothing has worked. Is there a method for this I am missing?

Answers

  • Options

    @SuperKodama have you looked into Rigidbodies and physics?

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Options

    @HoloSheep I have a Rigidbody with colliders on. It works if i just use addForce and make the objekt fly on its own into the wall. Should I try to use addForce instead of transform.position with manipulation as well?

  • Options

    @SuperKodama instead of transform.position have you tried Rigidbody.MovePosition?

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Options

    @HoloSheep Hm, It worked a little better. The object doesnt rotate in the lagging anymore. Is there a way to calculate the distance from the object to the closest part of the spatial mapping? I was thinking of using that in an if statement and check if the new position i to close to the spatial mapping and if so not move?

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    edited October 2016

    DELETED: Nevermind, I should read the questions better.

    Building the future of holographic navigation. We're hiring.

Sign In or Register to comment.