2019-05-26, 12:27 AM
If i understood what he wants is:
lets say P1 and P2 are they points so
raycast = lenght_you_want * P2-P1/VectorSize(P2-P1)
Explain:
P2-P1 will give you the vector from p1 pointing to p2. Dividing it for his norm to make it unit (see maslag coment). And then multiply for the lenght you want to stretch it :)
lets say P1 and P2 are they points so
raycast = lenght_you_want * P2-P1/VectorSize(P2-P1)
Explain:
P2-P1 will give you the vector from p1 pointing to p2. Dividing it for his norm to make it unit (see maslag coment). And then multiply for the lenght you want to stretch it :)