Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
gggmork

change pitch of skybox viewpoint

Recommended Posts

I probably won't want to do this anyway, but out of curiosity I guess you can't?
Like I have a skybox with a skybox viewpoint. I thrustthingz the viewpoint and that is visible in the sky (like the sky moves up when the viewpoint is zthrusted, but changing the viewpoint's pitch has no visible effect. It prints that the pitch was changed successfully, but the camera's pitch still appears the same as the player's viewpoint pitch. (like basically can't make the sky camera look up/down independently).

Share this post


Link to post

The skybox camera's pitch and angle are indeed ignored since it's the viewpoint pitch and angle that are used.

Now I wonder how it'd look to add a FLOATBOB-like vertical movement to the skybox camera. (Not the FLOATBOB flat itself, it wouldn't work.)

Share this post


Link to post

That makes sense.

I was actually kinda doing an alternating height change, similar to floatbob, but didn't try the actual decorate 'hard coded' floatbob:

#include "zcommon.acs"

script 1 enter
{
    int i = 0;
    while(1)
    {
        //setactorpitch(1,-5825);
        //print(f:getactorpitch(1)<<16);
        for(i=0;i<3;i+=1)
        {
            delay(10);
            thrustthingz(1,1,0,0);
        }
        for(i=0;i<3;i+=1)
        {
            delay(10);
            thrustthingz(1,1,1,0);
        }
    }
}
I'm pretty sure doing a delay of only 1 messes it up, like maybe the thrust takes more than 1 tic so needs to wait longer until next thrust or something.

Actually, this whole acs coded setup where "scripts" are so completely modular with their own delays has always interested me, and not sure if I'd figure out how to do similar when coding my own game. My guess is the main "game" has a big "while 1" loop, then each script is treated like a big string that is directly executed or something. And if it has "delay bla" then a counter counts down from bla until executing that script string again on further iterations.

It could be weird to make the sky look like its quaking or something. I was going to try making the sky camera go on some path through hoops or something as an experiment, but now I know not to bother w/ angle or pitch.

You should make some super complex special effects map or something since you know just about every minor detail there is to know off the top of your head it appears.

Share this post


Link to post

I tried a different sky experiment, trying to make the sky alternate spinning left and right, slowing until it reverses, then speeding up, repeat, using setskyscrollspeed().

But that function seems kind of broken:

script 1 enter
{
    //ChangeSky("SKY3","SKY3");
    int max = 512;
    int min = -512;
    int step = 64;
    int spd;
    while(1)
    {
        for(spd=min;spd<max;spd+=step)
        {
            setskyscrollspeed(1,spd);
            delay(100);
        }
        for(spd=max;spd>min;spd-=step)
        {
            setskyscrollspeed(1,spd);
            delay(100);
        }
    }
}
Like every time its called, it feeds some sort of random junk angle instead of remembering what it last was, causing it to jerk along every 100 tics instead of smoothly slowing down etc.

Also setactorposition() worked better for my previous lame code paste if anyone cares (i made the skyviewpoint move back and forth which was kinda motion sickness enducing).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×