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 / Big problem with the camera

Author
Message
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 23rd Feb 2005 05:10 Edited at: 23rd Feb 2005 06:50
Hi

I am practising a little on useing the camera commands and some other stuff, so I'm making a test program for fun.
But there is some problems with the camera.
When I run it with THIS code:





There occours an error when I'm turning the box, and then moveing it.
In other words, I can only move the box forwards. Else it tells me:
Camera number illegal at line 31

OR

Camera does not exist at line 31.

I'm lost on that one.
Then I try and make a camera number 1, and that makes the code look like this:



But then i can't even run the code.
It says:

Parameter for "POSITION CAMERA" do noy match "X, Y, Z" at line 36.
Can someone help me?

[EDIT ] Using DBPro


Check out PanzerGames at: http://www.freewebs.com/panzergames
æ ø å
TravisP
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location: Behind you, with a knife!
Posted: 23rd Feb 2005 06:23 Edited at: 23rd Feb 2005 06:25
Look at this here..

It is thinking camera position x() is the camera number, y is x etc. It seems like typed 5 for the z position then added camera position z() at the end.

Note: The above I didn't say, your just crazy.

Not a ripoff of The Twilight Zone
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 23rd Feb 2005 06:38
But if it thinks that, then why won't



this work? I am really confused...


Check out PanzerGames at: http://www.freewebs.com/panzergames
æ ø å
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 23rd Feb 2005 06:45
Because then you've given position camera 5 parameters: 1, camera position x(1), camera position y(1)+2, 5, and camera position z(1). Position camera can only cope with 2,3 or 4 parameters.

Where exactly are you tring to position the camera?

Why do you sink I ave zees outRAGEOUS accente?!
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 23rd Feb 2005 06:49
Behind the player (object one), and the code SHOULD work fine, because I've tested it with another game. There it works fine. But I still don't understand why this won't work? :



Is it a bug or something?

Crap, I forgot to say I'm using DBPro


Check out PanzerGames at: http://www.freewebs.com/panzergames
æ ø å
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 23rd Feb 2005 06:52
Do you not read what people are saying?

From manual:

SYNTAX
POSITION CAMERA X, Y, Z
POSITION CAMERA Camera Number, X, Y, Z
POSITION CAMERA Camera Number, Vector

Most common method is top one. You are saying:

position camera camera position x(),camera position y()+2,5,camera position z()

What the hell is the ,5 for?

Boo!
Monsieur Mort
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 23rd Feb 2005 07:06
Get rid of the 5 and your program will work... sort of. Each line will run.

I don't understand why you've positioned the camera 3 times. Once you positioned it exactly where the object was, then you moved it 5 units, then you positioned it two units up from there, all of that in the do loop. What's going to happen is your camera will always be positioned in the same place, but you've wasted processor time and lines of code in getting it there. If you want the camera to move, you want to put your

"position camera object position x(1)..."

line BEFORE the do loop. If you don't, then just get rid of the "move camera..." and "position camera camera position x(1)..." lines, and change the first position camera statement to read something like this:

"position camera object position x(1), object position y(1)+2, object position z(1)-2".

That should make the camera position itself 2 units above the object, and 2 units back from it. let us know if you have more trouble... I suspect you will

Why do you sink I ave zees outRAGEOUS accente?!
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 23rd Feb 2005 07:17
No more problems here.

Quote: "What the hell is the ,5 for?"


Sorry, I saw that I had wrote a , instead of a .
And Monsieur Mort, I'm only positioning the camera two times, and try to run the code where you have removed one of the "position camera"s, then you may notice that it doesn't look quite right...

But thanks for the help.


Check out PanzerGames at: http://www.freewebs.com/panzergames
æ ø å

Login to post a reply

Server time is: 2024-09-23 12:23:06
Your offset time is: 2024-09-23 12:23:06