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 / 3rd person camera control (code)

Author
Message
ssj3_shadow
21
Years of Service
User Offline
Joined: 12th Jan 2003
Location:
Posted: 6th Jun 2003 05:57
ok this is what i have it is to controll the camera like in the game NWN.
for those who have not played this game this is what it does.
rotates the camera arround the object and zooms in and out.
see code
now there is only one problem with the following which i would greatly appreciate some help solving.

if u zoom in and then rotate tha camera the camera restes its position instead of rotating from the current position attained after the zoo (try the code)
if any one could help it would be much appreciated

MASTER
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 18th Jun 2003 21:08
...here...use this code instead...

make matrix 1,1000,1000,5,5
make object box 1,100,100,100
position object 1,500,50,500

sync on
b#=1

do
if leftkey() = 1
a#=a#+5
endif
if rightkey() = 1
a#=a#-5
endif
if upkey()=1
b#=b#-0.1
endif
if downkey()=1
b#=b#+0.1
endif
position camera 500+(sin(a#)*cos(400)*500)*b#,400*b#,500+(cos(a#)*cos(400)*500)*b#
point camera 500,50,500
sync
loop

...i hope this helps...

Anyone Can Destroy...But Few Can Create...

Login to post a reply

Server time is: 2024-11-24 18:56:04
Your offset time is: 2024-11-24 18:56:04