MapsSDK-Unity icon indicating copy to clipboard operation
MapsSDK-Unity copied to clipboard

Exist a way of improve the raycast performance?

Open Acuolo opened this issue 4 years ago • 1 comments

Im trying reacreate a collision with raycast, but method of the API has a low performance for this.

Exist a change of use RaycastCommand with your SDK? https://docs.unity3d.com/ScriptReference/RaycastCommand.html

Thanks!

Acuolo avatar Nov 23 '20 18:11 Acuolo

Because the content of MapRenderer doesn't use Unity colliders/mesh colliders, the RaycastCommand won't return results related to the MapRenderer. This is why MapRenderer provides a separate Raycast API.

I think there are some improvements that could be made to the MapRenderer raycast implementation which could speed it up though. Similarly, there may be a way to make the API work async so it can be called off of the main thread and/or in parallel with other raycasts.

There's no quick fixes here though unfortunately. Will leave this issue open to track.

kircher1 avatar Nov 25 '20 20:11 kircher1