microsoft / MixedRealityDesignLabs_Unity

Mixed Reality Design Labs share experimental samples, explorations and learning from Windows Mixed Reality Design group. If you are looking for official toolkit, please use Mixed Reality Toolkit
MIT License
408 stars 110 forks source link

Boundingbox + rigidbody + spatialmapping #88

Closed Zulex closed 6 years ago

Zulex commented 6 years ago

Hello all,

This is my first post here, so correct me if I forget something.

When using the boundingbox, rigidbody on the same object and spatial mapping, weird behaviour is seen. The object seems to be "floating" around after activating the boundingbox. The boundingbox standalone works perfectly and the combination of rigidbody and spatialmapping also work. I worked my way around this by disabling the rigidbody when the boundingbox is active and reactivate the rigidbody when theboundingbox is not active. Problem with this is that whenever an object is behind a wall(or in the ground) and you've deselected it, it's impossible to get the object out again. Would be possible when spatialmapping would be turned off but that makes the app harder for the user.

Any suggestions for a quick fix?

Unity version used: 2017.1 No adjustments to boundingbox or rigidbody. (boundingbox script is adjusted so it only scales x, the option didn't work in the inspector, but this only 1 line of code.)

Thanks in advance.

andy3hg commented 6 years ago

You can just deactivate the Spatialmapping.

Zulex commented 6 years ago

@andy3hg Thank you for your comment.

When spatialmapping is turned off, object can go through walls and floor, something I try to avoid. At this moment I'm turning off the rigidbody of the object which is being selected. this works to avoid weird behaviour but still makes it possible to put object in walls and under floors and will behave weird as soon as rigidbody is activated again..