|
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
OP
Senior Expert
|
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: Grimber]
#82126
07/21/06 06:30
07/21/06 06:30
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
OP
Senior Expert
|
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
Grimber
Expert
|
Expert
Joined: Sep 2003
Posts: 4,959
US
|
|
|
|
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
OP
Senior Expert
|
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: Grimber]
#82130
07/21/06 22:18
07/21/06 22:18
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
OP
Senior Expert
|
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
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|