Planefinding api returns real world floor with some offset
Issue: I am using SurfaceMeshesToPlane class from Holotoolkit to get the real world floor. I have noticed that floor is always returned with some offset: i.e. when i draw a cursor on detected floor or select a point, it always shows at some height above floor or some depth below the real floor.
Expected: Real world floor and HL detected floor should be as close as possible [5-10 cm offset acceptable].
Query: Do we need to adjust some parameter. [Urgent]
Unity Editor Version
Unity 2017.2.1p4
Mixed Reality Toolkit Release Version
10cm seems like a lot of offset between the real floor and HL floor. You could have a look at the cursor, it also has a parameter that separates it from the surface it sticks to, that will give you back about 2cm (from default values).
Can you please point me to which cursor script you are pointing to @JoseSantano-ms if not (https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/master/Assets/HoloToolkit/Input/Scripts/Cursor/Cursor.cs) ? Thanks a lot in advance.
Sure. On that exact same file, line 59. SurfaceCursorDistance: The distance from the hit surface to place the cursor
You should be able to edit that field from the editor
Apologies. I don't use this cursor. I have custom made cursor and i have made sure to keep the y-value 0. similar to the script you referenced. https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/master/Assets/HoloToolkit/SpatialMapping/Scripts/SpatialProcessing/PlaneFinding.cs I am using the function called FindPlane at line 161. Are you aware the best parameters should we pass to get the floor plane very close to the ground.? Thanks @JoseSantano-ms
As far as I'm aware this will find a plane on the mesh, not move the mesh closer to the actual floor and then create a plane. To the Hololens the mesh is the floor and it does a good job sticking to it.
The problem here is that the mesh always has some offset from the physical floor (most of the times above and sometimes beneath) and there isn't much we can do about it. However that offset isn't 10cm, if you're experiencing that then there's something else wrong with your scene.
Given that you've written your own cursor and you've also reported that the cursor isn't where you expect it to be I'm going to ask the obvious question. Have you tried with a simple ray or one of the given cursors? Do you get the same position?
Will check that and come back. So far, i am trying to play around with parameters in PLanefinding(https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/master/Assets/HoloToolkit/SpatialMapping/Scripts/SpatialProcessing/PlaneFinding.cs) & surface plane (https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/master/Assets/HoloToolkit/SpatialMapping/Scripts/SpatialProcessing/SurfacePlane.cs) to getter better floor.
Thanks
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.