|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
[Re: Saturnus]
#341373
09/15/10 16:15
09/15/10 16:15
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
Expert
|
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
i think a struct is a bad idea it wont work, because the engine doesn't use pan tilt roll or x y z, it only uses the memory allocated by the size of three vars! you can also write this:
function act_canon()
{
VECTOR temp;
VECTOR testvec;
while(1)
{
vec_set(temp.x, you.x);
vec_sub(temp.x, testvec.x);
vec_to_angle(testvec.x, temp.x);
ent_bonerotate(my, "canon", testvec);
wait(1);
}
}
you only need the .x if you use any sort of struct like an entity or view! ao the code with the defined struct won't work!
|
|
|
Entire Thread
|
How to combine x,y,z,pan,tilt,roll in one element ?
|
Toon
|
09/15/10 15:19
|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
|
Helghast
|
09/15/10 16:04
|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
|
Saturnus
|
09/15/10 16:05
|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
|
MasterQ32
|
09/15/10 16:15
|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
|
Toon
|
09/15/10 16:56
|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
|
MrGuest
|
09/15/10 20:36
|
Re: How to combine x,y,z,pan,tilt,roll in one element ?
|
Toon
|
09/15/10 16:25
|
|
|