-1

My object seems to go through walls even though the Spatial Mapping Collider is setup according to the documentation. But no Surface GameObjects is generated during runtime.

I get to see the mesh and if I activate occlusion then the game object (Holograms) is hidden behind objects as it's meant to be.

I am guessing this is because the Surface Game object is not being generated. I've check my Package.appxmanifest file and the MaxVersionTested is higher than "10.0.10586.0".

It would be really helpful if someone could tell me what I need to do to generate the Surface Game objects.

Sriram
  • 21
  • 2

1 Answers1

0

@Sriram, have you configured your object's collider to interact with physics layer 31? Layer 31 is the default on which the spatial mapping component place sets its objects.

Also, what versions of Unity and the MRTK (RC1, RC1 refresh, etc) are you using?

Thanks!

davidkline-ms
  • 206
  • 1
  • 4
  • Hi David, I'm using unity 2018.3.6f1 version and as for MRTK its RC1 refresh. – Sriram May 15 '19 at 06:56
  • The collider was set to interact with physics layer 31. But still the problem persists – Sriram May 15 '19 at 07:18
  • Hi Sriram, sorry for the delayed response (was out of the office). The mesh colliders do not prevent an object from being placed beyond (or inside) of another hologram. Unity's physics engine, to the best of my knowledge, does not prevent code from allowing objects from intersecting with other objects. Generally, applications that place a hologram or allow users to directly manipulate a hologram need to perform physics raycasts to detect improper placement and either block the placement or move the hologram. A good example in MRTK v2 is the SurfaceMagnetism solver script. – davidkline-ms Jun 03 '19 at 22:10