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 (AndrewAMD, TipmyPip, OptimusPrime), 15,229 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
Page 2 of 2 1 2
Re: Scene flag for skies - invalid parameter? [Re: Grimber] #82124
07/20/06 23:18
07/20/06 23:18
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
In my case, I'm not trying to dynamically change any flags, just the position. I've defined the sky element and the scene flag doesn't work.

Code:

sky skysphere // define the sky object - only works if a block with a sky texture is given
{
type = <skysphere.mdl>;
layer = 3; // pick a number, any number (or is it card?)
flags = scene, visible; // scene flag
}

function scaled_sky()
{
var scaling = 4;
proc_late(); // required to prevent odd effects from occurring

while (!skysphere) // wait until pointer is valid
{
wait(1);
}

while(1)
{
/* // sky doesn't move if commented out, but does in reverse when not
// plus, this worked normally when a normal entity is used, but not for a sky
skysphere.x=camera.x/scaling*(scaling-1); // sets positions
skysphere.y=camera.y/scaling*(scaling-1);
skysphere.z=camera.z/scaling*(scaling-1);
*/
wait(1);
}
}



This is my sky definition as I have it. When I move the camera to a certain direction, the sky object disappears and it moves in reverse. Without the object being as a sky, when I moved the camera forward, I could see the texture "grow" meaning that I was getting closer to it. With it being a sky, when I move the camera forward, I see the texture "shrink" and at a much more rapid rate, the opposite. When you go toward something, it appears to get bigger, so why, when defined as a sky, does it get smaller? It's reversed!? Weirder yet, if I pan the camera in just the right direction, halfway between north by east and due north, the sky sphere just disappears all together. The object, however, is still supposedly not being put into the back end of the buffer to be drawn behind everything else....


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Scene flag for skies - invalid parameter? [Re: ulillillia] #82125
07/21/06 06:10
07/21/06 06:10
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
sky entities x/y/z is a messured from the view, not the level origin ( the origin point for a sky entity is the view itself) which looks like where your problem is ( by adding your camera location to the distance from the view)

Re: Scene flag for skies - invalid parameter? [Re: Grimber] #82126
07/21/06 06:30
07/21/06 06:30
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Okay, then what explains the case where the object just disappears? Even with that area commented out leaving just the wait, it still happens at the same position.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Scene flag for skies - invalid parameter? [Re: ulillillia] #82127
07/21/06 12:17
07/21/06 12:17
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
clipping

Re: Scene flag for skies - invalid parameter? [Re: Grimber] #82128
07/21/06 12:35
07/21/06 12:35
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
How do I fix the clipping issue so that it doesn't clip at all. The sky object should behave just like any other entity. The object has a diameter of 16384 quants. The triangles on it are very large in size, at least a hundred quants.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Scene flag for skies - invalid parameter? [Re: ulillillia] #82129
07/21/06 21:14
07/21/06 21:14
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
try adjusting your clipping values

clip_near clip_far sky_clip

Re: Scene flag for skies - invalid parameter? [Re: Grimber] #82130
07/21/06 22:18
07/21/06 22:18
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline OP
Senior Expert
ulillillia  Offline OP
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
clip_near and clip_far are both at their defaults. I'd otherwise have to suspect sky_clip is at fault.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Page 2 of 2 1 2

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