Topic: Ray Casting Stops Working At Certain Zoom Levels

Hello,

I am using Online Maps with the Tile Set Control script. We are properly overlaying our data points on the map based on the texture coordinates. I have noticed some very strange ray casting behavior. Ray casts work perfectly when zoomed in between zoom level 3 and zoom level 10. Once I reach zoom 11, my ray cast no longer collides with the points on the map. I am certain the points are being rendered in the correct location and that our collider should be colliding with the ray. We are not using the marker system provided with the Online Maps Plugin. Can anyone think of a reason why zooming in past level 10 would break ray casting? I also wanted to mention, we are not using elevation, but I noticed that if it is enabled, the initial range for elevation starts at zoom level 11 through the Max Zoom value, I just thought I would bring that up...

I will attach an image with my Online Maps settings as well as an image containing a Debug.DrawLine with origin as camera, and direction as ray direction. As you can see in the image, the ray goes through the collider gizmo, but I do not collide with the collider... Any help would be greatly appreciated.

Post's attachments

Attachment icon RayCast Capture.PNG 291.03 kb, 69 downloads since 2018-03-19 

Re: Ray Casting Stops Working At Certain Zoom Levels

Hello.

I think the problem is that for zoom > 10, elevations can be used, in combination with Collider Type - Simple Mesh.
I will check this to make sure, and if necessary, we will release an update.

Try to use another Collider Type.
Collider Type - Simple Mesh makes sense to use only if you use elevations.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Ray Casting Stops Working At Certain Zoom Levels

Hey Alex,

Thank you for the response. I was actually able to resolve my issue. The problem was that we were building our own collision mesh for a large amount of points. As we zoomed in, the distance between the points grew exponentially (by 2 each time). After a certain zoom level, the center of our point clouds were so far away from the specific point in the mesh, that it just broke collision. We were able to resolve the issue by only generating the collision within the bounds of the map. I have never really heard of this issue before, but I am glad we figured out a solution. Keep up the great work!

-Josh-