4 registered members (dBc, clonman, TipmyPip, 1 invisible),
19,019
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
direction
#120999
04/02/07 14:30
04/02/07 14:30
|
Joined: Feb 2006
Posts: 302 Beienrode/NDS/GERMANY
Dj_Pint
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
|
hey there! i use the following code:
trace_to.x = my.x + 10000 * cos(my.pan) * cos(my.tilt); trace_to.y = my.y + 10000 * sin(my.pan) * cos(my.tilt); trace_to.z = my.z;
now the problem: how can i set the trace_to - point to the right side or the left side? have i only to change the *cos(my.pan) to *cos(my.pan + 90) or what?
thanks, Dj Pint
if u want to see some stuff i made, go to youTube and search for djpint, not dj pint^^
|
|
|
Re: direction
[Re: Dj_Pint]
#121000
04/02/07 14:33
04/02/07 14:33
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
var TraceTo[3]; ... TraceTo.x = 0; TraceTo.y = 10000; TraceTo.z = 0; vec_rotate(TraceTo, my.pan); trace_mode = ?; c_trace(my.x, TraceTo, trace_mode; This will trace 10,000 quants to the right of the player, ralatively. Replace all the tricky trig with a simple vec_rotate(); 
xXxGuitar511 - Programmer
|
|
|
Re: direction
[Re: xXxGuitar511]
#121001
04/02/07 14:35
04/02/07 14:35
|
Joined: Feb 2006
Posts: 302 Beienrode/NDS/GERMANY
Dj_Pint
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
|
ahh cool, thx! but does this point pan with the actor or is it always the same?
Last edited by Dj_Pint; 04/02/07 14:36.
if u want to see some stuff i made, go to youTube and search for djpint, not dj pint^^
|
|
|
Re: direction
[Re: Dj_Pint]
#121002
04/02/07 15:23
04/02/07 15:23
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Pans with the actor...
It's the same as above, but repleaces trig with vec_rotate()...
Just adjust the offset to where you need it.
xXxGuitar511 - Programmer
|
|
|
|