How to check if the red line collison the blue square / is inside of blue square.
Blue square created in player spawn origin.
I have this datas value for red line:
PHP Code:
new Float:fStart[ 3 ] // contain the start origin of RED LINE
new Float:fEnd[ 3 ] // contain tha end origin of RED LINE
// I tried to calculate when red line is inside of blue square
new Float:fTest[ 3 ]
fTest[ 0 ] = fStart[ 0 ] * fEnd[ 0 ] / fStart[ 0 ] - fEnd[ 0 ]
fTest[ 1 ] = fStart[ 1 ] * fEnd[ 1 ] / fStart[ 1 ] - fEnd[ 1 ]
fTest[ 2 ] = fStart[ 2 ] * fEnd[ 2 ] / fStart[ 2 ] - fEnd[ 2 ]
// but doesn't wok!