Hi,
well, your first three suggestions are "just" shorter versions of mine. Would be better to use the short ones, for sure, but during the development process I like to have a few more (but therefore more readable) lines with fewer content each ^^
vec_normalize(grindtrace, 100);
If I'm not mistaken, there's no question about what vector is "changed" here - the "grindtrace" vector is changed, however, only in length, not in direction or orientation. This is to make sure that the target of the trace really IS 100 quants beneath the trace origin point, nothing else ^^
Same goes for "vec_normalize(grindheight, -47)". My model is 94 quants high in total (at least MED told me that ^^), so if I have calculated the position the player's feet are supposed to be, I have to go upwards 47 quants in order to get the point where the model origin has to be then.
I just re-wrote the whole code from scratch, SAME PROBLEM as previously: The grind suddenly (with no visible reason whatsoever) STOPS halfway accross the rail, and ALWAYS at the SAME point!! I tried two independent rail models, both with the same result! Something's definitly wrong in here...
Thanks for your tips Ottawa!
Alan