|
2 registered members (TipmyPip, madpower2000),
1,532
guests, and 18
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Normal's ANGLE
[Re: 3run]
#350750
12/18/10 21:24
12/18/10 21:24
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
"You are saying that normal is always stands in 90 degrees, what you mean by that?" => The normal stands always in a right angle [= 90°] on the surface, that's the definition of a normal. Suppose that you have two vectors, v1 and v2. Then your angle can be calculated as follows: my_angle = acos((v1.x*v2.x+v1.y*v2.y+v1.z*v2.z)/(vec_length(v1)*vec_length(v2));
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: Normal's ANGLE
[Re: Superku]
#350755
12/18/10 21:53
12/18/10 21:53
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Thank you so much Superku  Just one more question, where do I get that two vectors? I need to set surface's angle, to do not allow player climb surfaces with a high angle. So I'll use 'c_trace' to detect surface under player's feet (normal (only now I got what was meant by "right angle", really hard to learn Maths in English for me)). But where do I get two vector's? Thank you one more time.
|
|
|
|