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 / Positioning camera...

Author
Message
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Jun 2004 20:20
Yeah no one seems to respond to my topic, help understanding error, where we ended up getting to this topic, so can some one help me?
I know the command, but it doesn't seem to work, I always appear on the side of the matrix...

Got anime?
I do.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Jun 2004 20:27
It would help if you showed some code

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Jun 2004 20:57
I removed it from the code because it wasn't work.
Can you explain the coordinates (X,Y,Z)
Because does the y mean how high up or just
like a grid...

Got anime?
I do.
Raithe
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location:
Posted: 19th Jun 2004 22:11
Ok think of x=horizontical y=vertical z=... Back and forth "depth"
Sorry for the bad exsplanation

~Ellusion Games~
xXxLife is like a box of chocalate's there's always one's you dont likexXx
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Jun 2004 22:22
Imagine space like a big grid.

Pretend you're standing facing forward. Take one side-step to your right. You've moved on the x axis.

Jump up. That's the Y axis.

Walk forward, that's the Z axis.

The co-ordinates the command requires tell DB where to put the camera in the world. If you have an object at co-ordinates 50,0,50 you may want to pace the camera at 50,0,25 (a bit behind the object).

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 20th Jun 2004 00:15 Edited at: 20th Jun 2004 00:19
Quick refresher,
out of or in the mainloop?

Got anime?
I do.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 20th Jun 2004 01:58
Maybe this little piece of code can help you to understand..
Scorpyo
Balid
20
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 20th Jun 2004 02:19
Anime BLOOD,

Short answer - 'in the main loop'.

If you never have a camera location update then it will always be at XYZ zero.

Balid
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 20th Jun 2004 05:47
URRRRRGHHH!!!!
It's not working...

Got anime?
I do.
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 20th Jun 2004 07:49
And what is 'it'? I'll presume it is your brain's ability to describe problems.

Show us some code, tell us what you want it to do, and we can help.
--
TAZ

History did not begin with PONG. -- Greg Costikyan

Game Beavers
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 20th Jun 2004 16:43
It's kinda stated in the thread, simply the camera won't position where I tell it to. It always positions it in a corner of the matrix.

Got anime?
I do.
Lord Helmet
21
Years of Service
User Offline
Joined: 30th May 2003
Location:
Posted: 20th Jun 2004 21:17
OK, look, if you don't show us the code or describe specificly what ur trying to do, nobody can help you.

if the matrix is pos at 0,0,0 and your camera is at 0,0,0 then your camera will be at the corner of the matrix (the corner that it's positioned by)

try putting a print statement above or below your Pos camera command and print the Vars ur using to position the camera, that way each time the program updates the cameras position, it will tell you the coordinates it positining the camera at. Then if those coords on the screen change but the camera doesn't move, you'll know its your pos camera command. if the coords on the screen don't change than you'll know that the problem is somewhere else in ur program, probably whatever part is suposed to change your coords when you move the camera.

however if you don't know where your command is suposed to go (in or out of main loop) then you probably don't understand what ur program is doing anyway, and you will never be succesful at any programing if you don't know how it works, I can't stress that enough. You might tyr taking a class or starting with simple 'boring' tutorials like the math and accounting stuff that comes with DBpro
Lord Helmet
21
Years of Service
User Offline
Joined: 30th May 2003
Location:
Posted: 20th Jun 2004 21:38
Took a look at your other thread, I guess they didn't explain things very well.

see position camera places the camera at those XYZ coords. you can use this more than once.

first, outside main loop, set your player on the matrix (pos camera)
then in the main loop, update where ever the player is with the same command every time he moves. If you use the move camera command then the camera will be repositioned in the direction it's facing.

look at the different 3d camera commands in the help and you'll find a lot or of useful stuff for moving it around but you have to picture it in ur head (3d coords-3dspace) for it to all make sense.

Ur about to run into the problem where ur player moves straight through the matrix hills and stuff, use get ground height, I was having problems with an error myself though.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 21st Jun 2004 23:08 Edited at: 21st Jun 2004 23:14
Here's my full code, don't insult it... It's just a bit of the Monster Hunt at the moment and I'm planning to build to much more...

P.S
Replace the media with your own or something, cuz I'm not giving it out yet...
EDIT: This is an altered cod in which the matrix is no longer positioned at 0,0,0...

Got anime?
I do.
Balid
20
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 22nd Jun 2004 06:25 Edited at: 22nd Jun 2004 06:31
Take out this line: Position Camera 550,700,500. Its inside your loop.

`CHARACTER MOVEMENT AND MOUSE LOOK
Do
`POsitioning the camera
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
Position Camera 550,700,500



`Input control of Camera

Place:
X# = 550
Z# = 500

before your 'DO'. You don't need a Y# before the 'DO' because you set it in your loop before you position your camera.

Balid

Login to post a reply

Server time is: 2024-09-22 14:32:54
Your offset time is: 2024-09-22 14:32:54