Question about mapandreas Plugin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about mapandreas Plugin (
/showthread.php?tid=598091)
Question about mapandreas Plugin -
Lucky13 - 08.01.2016
Right so let me give a straight example:
If I want to find the Z, using X & Y and I am under a bridge, the Z will return on the bridge if I use mapandreas. Why?
Re: Question about mapandreas Plugin -
Pottus - 08.01.2016
Mapandreas is obsolete try ColAndreas.
Re: Question about mapandreas Plugin -
Lucky13 - 08.01.2016
Quote:
Originally Posted by Pottus
Mapandreas is obsolete try ColAndreas.
|
Oh, thank you for the fast answer!
Re: Question about mapandreas Plugin -
Lucky13 - 08.01.2016
I'm afraid ColAndreas has the same issue.
Re: Question about mapandreas Plugin -
PrO.GameR - 08.01.2016
Quote:
Originally Posted by Lucky13
Right so let me give a straight example:
If I want to find the Z, using X & Y and I am under a bridge, the Z will return on the bridge if I use mapandreas. Why?
|
If you are under the bridge you already know the z don't you ? Even if they don't have a native in either plugins you can try finding a collision in Z lower than the Z you have, this will do the trick, will take a little more calculation n coding, but possible to get it working.
Re: Question about mapandreas Plugin -
Crayder - 08.01.2016
Well. MapAndreas returns the HIGHEST Z of a given point. It's based 100% on a heightmap. Use ColAndreas.
Quote:
I'm afraid ColAndreas has the same issue.
|
No, it doesn't. You can cast a ray from any point to any other point and ColAndreas will always return the first point of collision. So if you are casting from say 1000 units above the ground straight to 0, yes it will return the top of the bridge. But if you are casting from below the top of the bridge it will return the ground below the bridge. So you should either check the model ID of the collision or use the multi-cast function.