07.11.2016, 19:09
I guess the wall can be detected with ColAndreas. Set a point to somewhere in front of the player and see if there's an object between it:
Function from AbyssMorgan's 3DTryg:
@Crayder, any better ideas? (I linked this post on his VMs)
Function from AbyssMorgan's 3DTryg:
PHP код:
Tryg3DProt:: bool:IsBetweenPlayerToPointIsWall(playerid,Float:x,Float:y,Float:z) {
new Float:xA,Float:yA,Float:zA,Float:xC,Float:yC,Float:zC;
GetPlayerPos(playerid,xA,yA,zA);
CA_RayCastLine(xA,yA,zA,x,y,z,xC,yC,zC);
if(xC == 0.0 || yC == 0.0 || zC == 0.0) return false;
return true;
}

