Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP

Serious User
VeT  Offline 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)


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: pan, tilt and ang_rotate [Re: VeT] #256575
03/17/09 16:12
03/17/09 16:12
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
actually, i can save in 3 arrays new pan,tilt,roll... but i'm looking for more simple way smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
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 Offline
Expert
EvilSOB  Offline
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 Offline OP

Serious User
VeT  Offline 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...


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: pan, tilt and ang_rotate [Re: VeT] #256627
03/17/09 20:12
03/17/09 20:12
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Damned... You're absoulutely right... If i'd use skills, it would be really THE SIMPLEST way :))))

I tried to deal with vectors rotation so much, that i missed really simple way. smile
EvilSOB, if you'd live in Kiev, i'd bought you a lot of beer laugh


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
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
K
KDuke Offline
Member
KDuke  Offline
Member
K

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
Re: pan, tilt and ang_rotate [Re: KDuke] #256632
03/17/09 20:27
03/17/09 20:27
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
KDuke, thanks, i'd heard about that "gimbal lock"... and i(its corrected to say, EvilSOB) found another solution smile

Thank you, guys


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1