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 / Preset Camera Move- help please!

Author
Message
stevkay
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location:
Posted: 25th Sep 2003 15:48
I'm looking to find out how to make the camera move about a matrix in a preset path, like a panning demo of a landscape. I've got the landscape fine, and everything is peachy apart from all i can do is push the camera about with the direction keys and mouse- how do i let it fly about by itslef for a set time, then end the program?

Any help? Thankyou.

Stevkay

If you gaze into the abyss long enough, the abyss starts staring back.
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 25th Sep 2003 19:04
Just an idea (I'm at work; can't test... )

- Establish the x,y,z coords of a list of waypoints (= key points of your path, where the camera's trajectory changes). I'm afraid this must be done manually...
- Store these values in an array.
- Make an invisible object and move it from one waypoint to the next, using "CURVEVALUE" to obtain smooth movements.
- Use the "SET CAMERA TO FOLLOW" command to follow the invisible object.

Otherwise, take a look at the Binary Moon Tutorial ( http://developer.thegamecreators.com/?f=t02/bm_tutorial_45 ) ; I think the way he moves the camera when you win or loose may interest you...

Ideas: memories of things which did not occur yet...
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 26th Sep 2003 06:28
This code is taken straight from a DBC help v1.10 file... i THINK it needs the enhancement pack, but you can try without it...

all that i changed in the code was the timer wich only allows 30 seconds of flight as you required.



If Quizz's Are Quizzical, Then What Are Test's?
koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 28th Sep 2003 09:13


A.W.S.D is to move
Space is to jump
Ctrl is to crouch
=)

Famous last words -
Pull the pin and count to what?
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 28th Sep 2003 12:39
i think i've got what your looking for, its bascically what kelebrindae said but with code!



hope it helps, any questions just ask


koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 29th Sep 2003 03:21
oic cool

"Hello this is the suicide hotline, please hold..."
http://www.rovokaa.tk/ -
stevkay
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location:
Posted: 1st Oct 2003 15:46
Thanks. Red_eye, and Kelebrindae, your ideas seem to be the kind i'm after, so as the program runs without any user input. I'll give it a go this afternoon and let you know...

Thanks.

If you gaze into the abyss long enough, the abyss starts staring back.
stevkay
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location:
Posted: 1st Oct 2003 18:16
I tried to put your script into my program (its using magic world to create the matrix), and every way i try to put it in, i always end up with an "object already exists at line 84" or similair. wondering if any of you can help- heres my initial code, looking at the matrix from a predefined point:



And this is the "magicload" dba file that is needed to run the already created mwdb matrix file from magic world. I'm not sure if the objects are clashing here, and there is some editing to be done.


Thanks for any help.

/Steve.


[/quote]

If you gaze into the abyss long enough, the abyss starts staring back.
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 1st Oct 2003 21:47 Edited at: 1st Oct 2003 21:48
ah, just delete everything below the load magicload() function and then copy all my code below the randomize matrix command and then paste it beneath you magicload() function



also change the line
make object sphere 1,1
to
make object sphere 5000,1
or a bigger number if you still get object already exists errors

hope that helps


stevkay
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location:
Posted: 2nd Oct 2003 15:51
Thanks- everything is working perfectly now; my eternal gratitude.



If you gaze into the abyss long enough, the abyss starts staring back.
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 2nd Oct 2003 20:55
no probs, i've never done something like that before so it was kinda interesting to have a go.


Login to post a reply

Server time is: 2025-05-20 14:17:05
Your offset time is: 2025-05-20 14:17:05