Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Unexpected Camera movement

Author
Message
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 6th Aug 2010 00:56
Hi All,
Starting to get some results in DBP! But I still have a long way to go.

In my program, as soon as I hit a camera control key, the camera warps to the 0,0,0 coordinates. I am stumped. Any help would be appreciated!

Thanks in advance!
Mike



some cool stuff someone else said here
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 7th Aug 2010 01:08 Edited at: 7th Aug 2010 12:21
I've had a mess around and thus far managed to get it working.

I don't think you needed to put Position Camera xpos,CamHeight,zpos after every Keystate command, i moved it inside the do / Loop part so it constantly updates. Also, and this is just a guess on my part...
where you have declared


it seems to think that xpos and zpos are defaulted to 0 and becuase you haven't used the xpos and zpos in the position camera following that, as soon as you move it positions the camera to the default xpos and zpos, so i have changed it to this (like i said thats just a guess but what i did to the code seems to work)


here is the full code for your consideration:-


I can see from your smile, you're not here for the sunset

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

Login to post a reply

Server time is: 2024-11-16 15:30:43
Your offset time is: 2024-11-16 15:30:43