The page appears to be fleshed out with more details.
void DrawDebugLine( const Vector& point1, const Vector& point2, int r, int g, int b)Draws a debug line on screen with the specified points and colour.
Parameters
point1 - the start point
point2 - the end point
r - red colour component
g - green colour component
b - blue colour component
So if we wanted this from the player's gun, to a point that it's looking at, it's not something we can just discount as point1 and point2 because we need the player's raycast.
So am I correct that we'd merely need to do something like I'm guessing here?
(don't wanna try in RC1)
Object@ hitObject = GetGameManager().GetWorld().RayCast( shotPosition, shotDirection, distance, intersect, normal, false);
void DrawDebugLine( shotPosition, intersect, 1, 0, 0)
That would effectively draw it from our face to an object and technically not be visible as anything more than a single pixel, correct? It would be a dot at most.
So what about if I wanted to alter it so "shotDirection" was to be from the gun model at all times (following the animation) and raycast directly out of the front of it, and not from my viewport?
Would it be something close to this?
Matrix mtx = GUNbase.GetMatrix();
Vector rayPos = mtx.T;
object.GetWorld().RayCast( rayPos, Vector( 0, 0, 1), distance, intersect, normal, false);
void DrawDebugLine( rayPos, intersect, 1, 0, 0)