21.09.2017, 07:04
Quote:
I would just like to mention I noticed something off.
Код:
if(x == 0.0) x = EndX; if(y == 0.0) y = EndY; if(z == 0.0) z = EndZ; You should always use less than/greater than operators when using floats never the equal to operator. Код:
if(x > -0.0001 && x < 0.0001) x = EndX; |
PHP код:
Tryg3D::Function:: MovePointCol(Float:StartX,Float:StartY,Float:StartZ,Float:EndX,Float:EndY,Float:EndZ,&Float:x,&Float:y,&Float:z){
x = y = z = 0.0; //reset vars for RayCastLine and ignore old values
ColAndreas::RayCastLine(StartX,StartY,StartZ,EndX,EndY,EndZ,x,y,z); //save collision if exist in x,y,z
if(x == 0.0) x = EndX; //collision not exist set End value
if(y == 0.0) y = EndY;
if(z == 0.0) z = EndZ;
}
MovePointCol.inc
MovePointColCutLine.inc
MovePointColCutLineEx.inc
MovePointColWithVehicle.inc