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 / camera moving. around and around it goes!

Author
Message
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 15th Feb 2003 01:54


How do i make the camera like zelda or the othe games where you make it swing around to look in front of the character?
--------
RRREAARGH!
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 15th Feb 2003 02:22
rotate the camera individually from the player, move the camera around but make the player stand still
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 15th Feb 2003 02:23
?

--------
RRREAARGH!
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 15th Feb 2003 06:24
quoth please explain

--------
I HAVE SOME IDEA HOW TO PROGRAM DARK BASIC!
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 15th Feb 2003 13:46
like this?:

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 15th Feb 2003 21:59
ok thats slightly wrong
try this:
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 15th Feb 2003 22:16
sorry i cant view it i use netscape and my IE is refusing to work. p

--------
I HAVE SOME IDEA HOW TO PROGRAM DARK BASIC!
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 16th Feb 2003 00:28
this format best then:

sync on
sync rate 95
autocam off

rem make player
make object box 1,2,4,2
position object 1,0,2,0

rem make terrain
make matrix 1,50,50,5,5
position matrix 1,-25,0,-25

rem camera
position camera 0,10,-15
point camera 0,5,0

rotate$="Clickmouse to view front of player"
angle#=180
do

if mouseclick()=1
for x=1 to 180
position camera cos(angle#)*15,10,sin(angle#)*15
point camera 0,5,0
sync
dec angle#,1
next x
if mid$(rotate$,20)="f"
rotate$="Clickmouse to view back of player"
else
rotate$="Clickmouse to view front of player"
endif
endif

text 0,0,rotate$
sync

loop
aidwe
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location:
Posted: 16th Feb 2003 22:34
umm i no this sounds dum but how do u make it so it rotates round the player using left and right keys
(note i am very new to dark basic)

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 16th Feb 2003 23:54
like this:

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 16th Feb 2003 23:57
that posted wrong:

kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 18th Feb 2003 23:37
sorry i dont have dbp and i cant view code snippets.

--------
I HAVE SOME IDEA HOW TO PROGRAM DARK BASIC!
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 19th Feb 2003 02:06
If you want to view snippets with out internet explorer you have to view source and search for "codesnippet" until you find the one you want.

aidwe
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location:
Posted: 22nd Feb 2003 17:07
umm im sorry but u no i dont have dark basic pro so is there a way of doin that not on pro?

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 23rd Feb 2003 15:04
In case you haven't twigged, yet, click on the text saying "Code Snippet" to see the snippet

If you're talking about running snippets, then the above snippets seem to be compatible with DB1 so there should be no problem

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 2nd May 2003 15:59
thanks alot for your help!

Quote from my brother:
Quote: " Patience is a virtue... I know that but how does that help me? "

http://www.stellarblue.vze.com/
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 3rd May 2003 09:49
but there is one more thing i want to ask. Your source code swings around but not around the object. So if you move the object you swing around the place where the object was.

So how dou you make it swing around the object NOT around a point

Quote from my brother:
Quote: " Patience is a virtue... I know that but how does that help me? "

http://www.stellarblue.vze.com/
LREM 8888
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 3rd May 2003 12:14
put the point invisibly in the middle of the object!

An orange can't be a tomato but a tomato can be orange...
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 3rd May 2003 14:07 Edited at: 3rd May 2003 14:09
change this line:

position camera cos(angle#)*15,10,sin(angle#)*15

to this:

position camera object position x(obj)+(cos(angle#)*15),10,object position z(obj)+(sin(angle#)*15)

Login to post a reply

Server time is: 2024-09-20 07:56:53
Your offset time is: 2024-09-20 07:56:53