Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Pan = Roll? #44569
04/18/05 18:51
04/18/05 18:51
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
I'm trying to make a game where a entity can walk normally on a vertical wall.
But i found a big problem...when the tilt of the entity is 90 (on the wall), the pan angle, wich doesn't rotate along with the entity, becomes equal to roll angle. So when using left/right arrows, the entity doesn't turn normally, but rolls as if I changed the roll angle.
There are ways to fix this?

(sorry for the bad english...and ask if something isn't clear )

Re: Pan = Roll? [Re: _Tommo_] #44570
04/18/05 19:01
04/18/05 19:01
Joined: Mar 2004
Posts: 541
Germany
Jupp Offline
User
Jupp  Offline
User

Joined: Mar 2004
Posts: 541
Germany
I hope you speak German... Ich hoffe, dass du Deutsch sprichst:

Nun das liegt daran, dass die Entity immer zuerst zu seiner pan Ausrichtung gedreht wird und dann um diese pan Ausrichtung noch um seinen Tilt Wert und als letztes um seinen roll Winkel gedreht wird. Und wenn dann zum Beispiel tilt 90 ist, dann trifft es sich, dass roll und pan das gleiche bewirken.

Jupp

PS: Ich hoffe, dass du mich und diese Erklärung verstehst.

Re: Pan = Roll? [Re: Jupp] #44571
04/18/05 19:14
04/18/05 19:14
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
Sorry...i don't speak german, and i can't understand nothing of what you say...

Re: Pan = Roll? [Re: _Tommo_] #44572
04/18/05 20:00
04/18/05 20:00
Joined: Mar 2004
Posts: 541
Germany
Jupp Offline
User
Jupp  Offline
User

Joined: Mar 2004
Posts: 541
Germany
Hello,
It's difficult for me to discribe this in English. I try it. Pan and roll are not the same. This is only in the special case, in wich tilt is 90 or -90. The engine rotates the entity first to its pan angle and then relativ from its pan angle to its tilt angle. And now relative from its tilt and pan angle to its roll angle. If you don't understand this, you have to wait for another memeber...

Sincerely yours
Jupp

Re: Pan = Roll? [Re: Jupp] #44573
04/18/05 20:35
04/18/05 20:35
Joined: Apr 2005
Posts: 64
Italy - Rome
_
_Tommo_ Offline OP
Junior Member
_Tommo_  Offline OP
Junior Member
_

Joined: Apr 2005
Posts: 64
Italy - Rome
Thanks, that's my problem. I want that my entity walks normally also when it's tilt is 90 or -90, but i can't get this, because of this sovrapposition of the angles. There is a way to avoid this?

Re: Pan = Roll? [Re: _Tommo_] #44574
04/18/05 21:41
04/18/05 21:41
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
3DGS uses Eular angles aligned to the level grid system.
you need to convert the angles to handle what your after.
Search 'getting started' forum I covered the topic about a month or so back.

Re: Pan = Roll? [Re: Grimber] #44575
05/16/05 05:59
05/16/05 05:59

A
Anonymous
Unregistered
Anonymous
Unregistered
A



use ang_add to change a temp vector, then set your player position vector to it for object axis oriented rotation:
if(key_g==on){vec_add(temp.x,(1,0,0)}
ang_add(temp.x,player.x)
vec_set(player.x,temp.x)

or you can adjust your angles with sines and cosines, vec_for_angle, and vec_to_angle which might work depending on your situation. Oh yeah, my game that has an angel flying around wouldn't work if you couldn't rotate him whichever way you want. I've found that 3D gamestudio's "Euler" rotation allows pan to only rotate around the z, tilt to rotate around x or y and roll around any axis (now that's pretty confusing!)

Re: Pan = Roll? [Re: _Tommo_] #44576
05/16/05 08:12
05/16/05 08:12
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
ang_add or ang_rotate is what you need for rotating an entity about it's own axis, rather than the world axis. For instance

ang_add(my.pan,vector(time,0,0));

or

ang_rotate(my.pan,vector(time,0,0));

Both instructions only differ in the order the angles are added.

Re: Pan = Roll? [Re: jcl] #44577
05/16/05 12:47
05/16/05 12:47
Joined: Nov 2004
Posts: 1,011
South Africa
capanno Offline
Serious User
capanno  Offline
Serious User

Joined: Nov 2004
Posts: 1,011
South Africa
What exactly is the diffrence?


Moderated by  HeelX, Spirit 

Gamestudio download | 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