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 / Print Camera position

Author
Message
Mathew_wi
15
Years of Service
User Offline
Joined: 12th Jun 2009
Location: Idk.
Posted: 29th Jun 2009 01:28
How could I make my camera position to show while testing?
This would make it incredibly easy for positioning objects.

Thanks

Please try and make it SMALL.

I am a beginner
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 29th Jun 2009 03:34
look into camera position x() and theres one for y and z also..

just use them with the print command...

Come and have a look at my hobby site once your ready..
http://darkdstudio.webs.com/
Note: its still really bare..
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Jun 2009 03:48 Edited at: 29th Jun 2009 03:49
Try these commands:

Camera Position X()
Camera Position Y()
Camera Position Z()


They all return the camera's position on that axis.



If your text scrolls to the bottom of the screen and makes a litte black bar just add SET CURSOR 0,0 before the PRINT commands.

<-- Spell based team dueling game!
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 30th Jun 2009 22:42 Edited at: 30th Jun 2009 22:43
If you are looking for a real time update to the screen, then the text command is really better than print. It allows you to place the text anywhere you like.

This is a function I use in the majority of my programs. I always keep it in my functions.dba file I attach to most of my projects. No point wasting good code!

In action:


Function Campos(temp)
Text 10, 10, "Cam Pos x: " + str$(camera position x(temp))
Text 10, 21, "Cam Pos y: " + str$(camera position y(temp))
Text 10, 32, "Cam Pos z: " + str$(camera position z(temp))
EndFunction

Login to post a reply

Server time is: 2024-11-24 03:29:55
Your offset time is: 2024-11-24 03:29:55