SA-MP Forums Archive
[Help]ColAndreas CA_RayCastLine - 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: [Help]ColAndreas CA_RayCastLine (/showthread.php?tid=631439)



[Help]ColAndreas CA_RayCastLine - PhamHoang - 29.03.2017

I really do not understand what the CA_RayCastLine for
(( CA_RayCastLine(Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ, &Float, &Float:y, &Float:z))
And x, y, z for what and how to use it?
I need a simple example


Re: [Help]ColAndreas CA_RayCastLine - DRIFT_HUNTER - 29.03.2017

That function is used to check if there is anything between Start and End pos. If there is any obstacle (wall, tree, fence, any object with collision) it will return modelid and store position of ray cast collision position to x, y, z.

So basically you can do many things with it...from checking if player is in air to checking if there is something in a path of missile/bullet...


Re: [Help]ColAndreas CA_RayCastLine - PhamHoang - 29.03.2017

THanks, <3