Yes rel I can. A guy (named Azuroth aka asmodeus) taught me this. It uses a WhichSide algo which determines what side of a line a 2d coordinate is. For a triangle collision, you see what sides of each 3 lines the centre of the triangle is in, and compare those sides with the testing 2d coordinate. If they all match, your inside the triangle.

This is because the centre of a triangle is always inside the triangle.

I have a

sample program and heres the algo:

'returns true if the (x!, y!) coordinate is inside the triangle

FUNCTION insidetri% (x!, y!, x1!, y1!, x2!, y2!, x3!, y3!)

cx! = (x1! + x2! + x3!) / 3

cy! = (y1! + y2! + y3!) / 3

sideA1 = whichside(cx!, cy!, x1!, y1!, x2!, y2!)

sideA2 = whichside(cx!, cy!, x1!, y1!, x3!, y3!)

sideA3 = whichside(cx!, cy!, x2!, y2!, x3!, y3!)

sideB1 = whichside(x!, y!, x1!, y1!, x2!, y2!)

sideB2 = whichside(x!, y!, x1!, y1!, x3!, y3!)

sideB3 = whichside(x!, y!, x2!, y2!, x3!, y3!)

insidetri% = (sideA1 = sideB1) AND (sideA2 = sideB2) AND (sideA3 = sideB3)

END FUNCTION

'checks what side of a line a pixel is

'(returns true or false for different sides)

'(x!, y!) are coordinates of 2d pixel

'(x1!, y1!) -> (x2!, y2!) are coordinates of a line

FUNCTION whichside% (x!, y!, x1!, y1!, x2!, y2!)

dx! = x2! - x1!

dy! = y2! - y1!

IF dx! = 0 THEN

whichside = x! < dx!

ELSEIF dy! = 0 THEN

whichside = y! < dy!

ELSE

Vg! = dy! / dx!

cy! = Vg! * (x! - x1!) + y1!

whichside = y! < cy!

END IF

END FUNCTION