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.

DarkBASIC Discussion / camera modes

Author
Message
koolaid
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 25th Mar 2003 02:09
okay i have one camera that follows the main characters movements chase_cam(1)
i want to set up another camera and run it like if i push the downkey() to go to that cammode and return to the previous one if i want
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 25th Mar 2003 15:55
This was typed out of my head, so it might contain some errors, but it should work.



Whatever I did I didn't do it!
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 25th Mar 2003 15:56
Also, I should probably have made CameraX(number), CameraY(number) and
CameraZ(number) into real values, i.e CameraX#(number), but this isnt strictly necessary.

Whatever I did I didn't do it!
koolaid
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 26th Mar 2003 00:57
explain a little more if you would on whats going on there,im trying to get a understanding of how to set up different camera modes and switch beteween i want my program to start with the main camera which is a chase camera that is behind the player.i want a optional camera mode in another view point still locked on the player im not sure how to set it up to switch beteween them and updating the screen?
Leade
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 26th Mar 2003 16:30
I think i know what Kentaree means
i'll make a little change to what he (or she) wrote.

'Create a few arrays to hold our data
MaxCams = 4
Dim CamX#(Maxcams)
Dim CamY#(Maxcams)
Dim Camz#(Maxcams)

'Now create our defaults 5 cameras.
'1st person, Chase1, Chase2, HighChase1, FarChase
CamX#(0)=0
CamY#(0)=0
Camz#(0)=0

CamX#(1)=0
CamY#(1)=0
Camz#(1)=-10

CamX#(2)=0
CamY#(2)=0
Camz#(2)=-20

CamX#(3)=0
CamY#(3)=-100
Camz#(3)=-100

CamX#(4)=0
CamY#(4)=-500
Camz#(4)=-500

'Now when you choose a new camera you just have to add
camx# to object position x,
camy# to object position y,
camz# to object position z,

then adjust for rotation.
koolaid
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 26th Mar 2003 23:55
well lets focus on making one other camera,do you have to use arrays i havent had much experience with them just yet im still learnind various things as i tend to need them in creating my first game.

Login to post a reply

Server time is: 2025-05-18 05:39:09
Your offset time is: 2025-05-18 05:39:09