Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 832 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
short question about pan and roll values #337101
08/08/10 14:45
08/08/10 14:45
Joined: Jul 2010
Posts: 127
Germany, Herford
Ditje Offline OP
Member
Ditje  Offline OP
Member

Joined: Jul 2010
Posts: 127
Germany, Herford
Manual says about values:
pan: 0 .. 360
roll: 0 .. 360

That can`t be correct. I can check negative values if(me.roll < -45) and I have tested me.roll +=1 it counts up endless.

I have created some entities which rotate the whole time. But what happens, if game runs over a long time and roll-value counts above 999.999? Do I have to set .roll value back to 0 if it reaches 360?

Thx Ditje

Re: short question about pan and roll values [Re: Ditje] #337102
08/08/10 14:49
08/08/10 14:49
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
they do not automatically cycle, but you only see a difference between 0...360 and not X*PAN and PAN (X = integer value)

you could easily cycle them

ent.pan = cycle(ent.pan,0,360);

Last edited by Rei_Ayanami; 08/08/10 14:49.
Re: short question about pan and roll values [Re: Ditje] #337103
08/08/10 14:50
08/08/10 14:50
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
write:

my.roll%=360;

so the value starts up 0 end ends with 360 (but strats again from 0)

cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: short question about pan and roll values [Re: Rei_Ayanami] #337104
08/08/10 14:54
08/08/10 14:54
Joined: Jul 2010
Posts: 127
Germany, Herford
Ditje Offline OP
Member
Ditje  Offline OP
Member

Joined: Jul 2010
Posts: 127
Germany, Herford
of course I can`t see a rotation of for example 405° - it`s the same like 45°. Maybe my question was not clear enough. For now I have a short statement:

level_icon1.roll += 4*time_step;

It runs the wohle time and shows just the level icons.

To prevent a to high value for .roll I can add this:

if(level_icon1.roll >=360) level_icon1.roll = 0;

But is this messesary?

edit: ahh ok now I understood - Thanks laugh
BTW: If I don`t do this - program would crash if value is higher than 999.999?

Ditje

Last edited by Ditje; 08/08/10 14:58.
Re: short question about pan and roll values [Re: Ditje] #337112
08/08/10 16:00
08/08/10 16:00
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
Originally Posted By: Ditje
BTW: If I don`t do this - program would crash if value is higher than 999.999?


nope


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku

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