|
 |
John VanSickle wrote:
>
> You really don't need to do this arcsin and rotation stuff.
>
> The better way to do it is:
>
> #local vZ=vnormalize(Position2-Position1);
> #local vX=vnormalize(vcross(y,vZ));
>
> and replace the rotate and translate with this:
>
> matrix < vX.x, vX.y, vX.z,
> 0, 1, 0,
> vZ.x, vZ.y, vZ.z,
> Position1.x, Position1.y, Position1.z>
>
> It may help you with this to also read
>
> http://www.geocities.com/evilsnack/matrix.htm ,
>
> which is tutorial I wrote about the matrix transform.
>
> Regards,
> John
I had it figured out with a lot of #if's in it, but I tried your solution
anyway because it looks so much more elegant.
But now a wall is rotated y * 90 from where it is supposed to be.
--
Ger
Post a reply to this message
|
 |