1 (edited by ZOE 2018-12-26 03:19:12)

Topic: Test Visibility of points

Is there any way to test the visibility of points in the scene?

Such as I click two point on the map, I want to know whether they can see each other (if there are mountains? buildings? between them)

Thanks

Re: Test Visibility of points

Hello.

Use Physics.Raycast to make sure that you have nothing between the points.
https://docs.unity3d.com/ScriptReferenc … ycast.html

Kind Regards,
Infinity Code Team.

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

Re: Test Visibility of points

Thanks
How could I transfer the map 2D coordinates  to world 3D coordinate?


Alex Vertax wrote:

Hello.

Use Physics.Raycast to make sure that you have nothing between the points.
https://docs.unity3d.com/ScriptReferenc … ycast.html

Re: Test Visibility of points

OnlineMapsTileSetControl.GetWorldPosition
http://infinity-code.com/doxygen/online … 2992c6e097
or
OnlineMapsTileSetControl.GetWorldPositionWithElevation
http://infinity-code.com/doxygen/online … 1b7b556e6b

Kind Regards,
Infinity Code Team.

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