2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: walking on walls -- alignToVec
[Re: Alan]
#292094
09/30/09 10:18
09/30/09 10:18
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Hi Alan! I'm glad you were able to resolve the issue before I got a chance to see the question But still if there are any questions, don't hesitate. Thanks everyone for the support Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: walking on walls -- alignToVec
[Re: GnR]
#351335
12/23/10 19:43
12/23/10 19:43
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
I believe it's something like:
ANGLE tempAng;
vec_set(tempAng, my.pan);
alignToVec(tempAng, normal, vector(0, 0, 1), 1);
vec_sub(tempAng, my.pan);
c_rotate(me, tempAng, GLIDE);
c_rotate adds the rotation to the entity's current orientation, so if we want to align it with an angle, all we need to do is subtract its real orientation first, and then perform the c_rotate with the difference (as shown above). I don't have time to test it, since I'm about to go on holiday for Christmas with my family Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|