Re: [Plib-users] Re: Intersection Testing / 3ds loading
Brought to you by:
sjbaker
|
From: Wolfram K. <w_...@rz...> - 2001-09-06 14:44:39
|
Thomas, which format were the files that PLIB didn't read? Do you want
to send one to me?
"Thomas Gahr" <pin...@we...> wrote:
>No, I'm not talking about accessing the VtxTables (I DO KNOW HOW TO DO =
IT!!!)=20
>I want to find out how to access the VtxTables IN THE ssgEntity,=20
>in wich I loaded my model to.
You have to recursively walk the scene graph that the loaders returns
to you.
>How can I find out the angle between the direction vector of my player=20
>and the plane I crashed into? (for sliding along)
You can calculate the normal "n" of the wall by using the vector
product ("Kreuzprodukt" in German) of the edges of the polygon.
If v is the old velocity, calculate a scalar factor "f" by doing
v*n / n*n. The new velocity is then v+f*n. f is calculated so that=20
v+f*n is perpendicular to n.
Bye bye,
Wolfram.
|