|
|
pan, tilt and ang_rotate
#256562
03/17/09 15:22
03/17/09 15:22
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP

Serious User
|
OP

Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
so, i have entities... some of them first, turned with you.roll = -90; and then with ang_rotate(you.pan,vector(CubeArr1AnlgeLand[i*max_cells + j],0,0));
how can i save second(pan) rotation? if i just save with CubeArr1AnlgeLand[you.sSideI*max_cells + you.sSideJ] = you.pan; it saves not 90(for example), but -135 (looking like because of roll)
|
|
|
Re: pan, tilt and ang_rotate
[Re: VeT]
#256577
03/17/09 16:27
03/17/09 16:27
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Its not very clear to me what you want, AFTER your second post anyway...
But seeing as your only using the PAN of the ang_rotate, cant you save JUST that value (CubeArr1AnlgeLand[i*max_cells + j]) into a ent-skill, that way it wont be affected by the objects initial pan/tilt/roll values........ That seems too simple, I must be missing what you mean.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: pan, tilt and ang_rotate
[Re: EvilSOB]
#256626
03/17/09 20:10
03/17/09 20:10
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
OP

Serious User
|
OP

Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
Okay, i'd try to describe it more totaly. 1) So, i have entity. 2) I rotate its roll(new roll is -90).. 3) Then i ang_rotate it in pan, by 90. 4) So new roll isn't -90 and new pan isn't 90, beacuse i rotate it around 2 axes. 5) And, when i apply you.pan, i get pan not 90 (like in step 3), but -135 Myabe i need to rotate vector with roll(2 step) and then, with the help of it, i would be able to get pan. I'd try to describe idea generaly: imagine that i have a cube.  I use 1 model for every side. For "Up"(1) side i create entity and rotate its pan as i wish(red arrow). For "Left" plane(2), i make model's roll =-90 and then, i rotate its pan(red arrow again). For "Forwrad" plane(3), i make models tilt = 90 and then i rotate its pan. But, in the 2 and 3 case, if i want to return model's pan, it wouldnt get its pan, beacuse i rotate it along 2 axes...
|
|
|
Re: pan, tilt and ang_rotate
[Re: VeT]
#256631
03/17/09 20:23
03/17/09 20:23
|
Joined: Mar 2009
Posts: 112 Germany
KDuke
Member
|
Member
Joined: Mar 2009
Posts: 112
Germany
|
Just wanted to let you know it would be pointless to try rotating on several axes one by one. That will cause a so called "gimbal lock". Even NASA hasn't found a solution for the gimbal lock in their flight simulators yet if they use one by one axis oriented rotation! So it's not really worth trying. So I recommend to try finding a solution which doesn't involve one by one rotation on every axis. No matter what the problem is.
greetings KDuke
Using A7 Free Click and join the 3dgs irc community! Room: #3dgs
|
|
|
|