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 / Moving up slopes

Author
Message
caleb870
19
Years of Service
User Offline
Joined: 13th Jul 2005
Location: LOOK! Over there!
Posted: 30th Oct 2005 15:18 Edited at: 30th Oct 2005 16:48
Can anyone help me with making a camera go up an incline? Because apparenty I haven't been able to, here's the script I'm using:


Hmmm... I can't think of a signature (How original)
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 30th Oct 2005 16:39


Just change the speed it moves the camera up and how far below the camera the intersection is being checked for to fit your needs. (The speed is how much the MOVE CAMERA UP command goes by, the intersection check point is the -10 bit of code, sorry I haven't got much time to explain it I'm late for a meeting.

caleb870
19
Years of Service
User Offline
Joined: 13th Jul 2005
Location: LOOK! Over there!
Posted: 30th Oct 2005 16:47
My compiler is DarkBASIC Pro, and the command "MOVE CAMERA UP" apparently doesn't exist, and so.. it didn't work.

Hmmm... I can't think of a signature (How original)
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 30th Oct 2005 17:09
It does exist. Make sure you have the latest updates.

Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 30th Oct 2005 17:28
pitch camera up


The word "Gullible" cannot be found in any English Dictionary.
Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 30th Oct 2005 18:46
here's what i use



Hope this helps

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 30th Oct 2005 19:01
Sorry I was just guessing at the camera movement I've never had a use for moving the camera since I use objects and I knew MOVE OBJECT UP was legitimate so I just figured it'd work.

On second that instead of using MOVE CAMERA UP use this:

POSITION CAMERA CAMERA POSITION X(),CAMERA POSITION Y()+1,CAMERA POSITION Z()

Else you'd be moving forwards or backwards if you looked up or down.

Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 30th Oct 2005 19:57


Now move camera up exists.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 30th Oct 2005 21:39 Edited at: 30th Oct 2005 21:41
Yes but there's two flaws:

1. Why take 3 lines to write the function and then a 4th line to call it when you could just use the main line, POSITION CAMERA X, Y+Whatever, Z? Just a waste of lines unless you're calling it extensively through the loop.

2. Moving something up in DBP doesn't always mean moving it up by the world axes, but instead by it's local axis. So "programming DBP" wise that isn't really moving the object up.

But you got the idea,

Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 30th Oct 2005 23:14 Edited at: 30th Oct 2005 23:14
1. It is a waste of time yes, but a lot of oop programmers like myself will either write 50 lines of code in about an hour. Or we will more than likely take three days to find a way to write the code in 3 lines in the main program. Such is the temptation of classes. Also this way it can save lines of code if you have more than one cameras. Then all you have to do is call the function for all the cameras in a for loop and voila the cameras are moving up!

2. True, but even in your FPS tutorial you had to change the way the jumping worked so you would go straight up. Why would you need to go forward when you look at the ground and jump? Same thing with going up a slope.

NEW FUNCTION****************************************


RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 31st Oct 2005 01:11
Umm, ehh...er...

...rawr?

Goodjob.

Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 31st Oct 2005 01:25

Login to post a reply

Server time is: 2024-11-27 14:33:43
Your offset time is: 2024-11-27 14:33:43