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
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 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
Sky Dome and U/V movement #292077
09/30/09 05:46
09/30/09 05:46
Joined: Mar 2009
Posts: 23
S
Siegewolf Offline OP
Newbie
Siegewolf  Offline OP
Newbie
S

Joined: Mar 2009
Posts: 23
Hello,

I have difficulties to force Sky dome to move using U/V parameters.

This code is NOT working although if I understood well from the manual and from a few topics I already checked, it should be working:

Code:
lvl_sky = ent_createlayer("sky_dome_1.tga", SKY | DOME | SHOW, 10);
lvl_sky.flags |= TRANSLUCENT;
lvl_sky.alpha = 60;
	
lvl_sky.v = 2;
lvl_sky.u = 2;



This next piece of code however is working, but I have a problem that even "0.002 * time_step" is too fast movement and with less than 0.002, it won't move.

Code:
lvl_sky = ent_createlayer("sky_dome_1.tga", SKY | DOME | SHOW, 10);
lvl_sky.flags |= TRANSLUCENT;
lvl_sky.alpha = 60;
	
while (1)
{
	lvl_sky.v -= 0.002 * time_step;
	lvl_sky.u += 0.002 * time_step;
	wait(1);
}



How can I force sky dome to move properly?

Re: Sky Dome and U/V movement [Re: Siegewolf] #292123
09/30/09 14:03
09/30/09 14:03
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
For the second problem: i think 0.002 * time_step is too small. Take it higher f.E. 0.02 and play with the wait(10) or wait(15).

Re: Sky Dome and U/V movement [Re: Widi] #292126
09/30/09 14:38
09/30/09 14:38
Joined: Aug 2008
Posts: 133
Sweden, Stockholm
E
Enduriel Offline
Member
Enduriel  Offline
Member
E

Joined: Aug 2008
Posts: 133
Sweden, Stockholm
0.002 is fast because the UV range is from 0 to 1 in the engine.

Re: Sky Dome and U/V movement [Re: Widi] #292178
09/30/09 20:33
09/30/09 20:33
Joined: Mar 2009
Posts: 23
S
Siegewolf Offline OP
Newbie
Siegewolf  Offline OP
Newbie
S

Joined: Mar 2009
Posts: 23
Originally Posted By: Widi
For the second problem: i think 0.002 * time_step is too small. Take it higher f.E. 0.02 and play with the wait(10) or wait(15).


"Wait" above 1 frame will indeed slow the sky down but then movement of the sky dome will not be smooth at all. The higher I rise the value the more stuttering there is.

Originally Posted By: Enduriel
0.002 is fast because the UV range is from 0 to 1 in the engine.


I tried many numbers already, 0.02, 0.1, 0.2..., 1, 2, etc. However everything above 0,00x is ridiculously fast. The slowest number I found, was 0.002.

Or do you want to say that no matter what I chose between 0 and 1, it is going to be too fast in case of UV movement?

Re: Sky Dome and U/V movement [Re: Siegewolf] #292181
09/30/09 21:18
09/30/09 21:18
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
What about this small change?

while (1)
{
lvl_sky.v -= 0.002 * time_step;
lvl_sky.u += 0.002 * time_step;
wait(-0.1);
}

Re: Sky Dome and U/V movement [Re: Pappenheimer] #292182
09/30/09 21:38
09/30/09 21:38
Joined: Mar 2009
Posts: 23
S
Siegewolf Offline OP
Newbie
Siegewolf  Offline OP
Newbie
S

Joined: Mar 2009
Posts: 23
Originally Posted By: Pappenheimer
What about this small change?

while (1)
{
lvl_sky.v -= 0.002 * time_step;
lvl_sky.u += 0.002 * time_step;
wait(-0.1);
}


I tried that as well. Sky is slower, although still fast for what I need and beside that, there is this stuttering effect as well.

Sky is moving smoothly only if I put wait(1). More than one frame or if I use seconds instead, stuttering effect appears.


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

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