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.

DarkBASIC Discussion / 3d camera problem

Author
Message
James Bond
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location:
Posted: 26th Jul 2004 00:35
i have posted this before but i think i must post it again bcoz many peoples replied me but none of them helped ... so many other peoples will think that they have answered by question and will not even check the topic!!
so here's the problem!!

[b]i want my 3d camera to follow my car ..... but i'am having problems in doing that ... so please some one do it for me . and before posting it here plz check it once ... u can use this cube instead of my car:
http://www.geocities.com/rehansites2/cube.zip

CODE:
Rem Setup sync rate
Sync On
Sync Rate 30

Rem Create sphere
load object "c:\cube.x",1

Rem Main loop
Do
Rem Store the object's Y angle in aY#
aY# = Object angle Y(1)

Rem Control input
If Upkey()=1 then Move object 1,2
If Leftkey()=1 then aY# = Wrapvalue(aY#-5)
If Rightkey()=1 then aY# = Wrapvalue(aY#+5)

Rem rotate the sphere
Yrotate object 1,aY#

Rem Refresh Screen
Sync
Loop
DDD Productions
21
Years of Service
User Offline
Joined: 14th Mar 2004
Location: On Earth
Posted: 26th Jul 2004 01:44
The source code I have included was used for my first 3D program which was just about driving a car and working out several calculations which I may have needed in the future. It was only a test, not a game. I have used the command:

set camera to follow x, y, z, Angle, Camdist, Camheight, Camsmooth, ColFlag

D.D.D Productions
Specializing in game creation
James Bond
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location:
Posted: 26th Jul 2004 13:16
sorry but i can't understand all this because i'am a beginner in coding .... please give me the exac code
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 26th Jul 2004 13:50 Edited at: 27th Jul 2004 07:32
Oh, c'mon Bond, get real. It is not very polite to demand the exact code. Take a look at the help files. They explain exactly what each command does, and exactly what each parameter of each command is for. I enjoy helping people, but not when they have a nasty attitude Check some tutorials, take a nap, then try to figure out one simple camera command.

Sorry for that rant, but I found this thread annoying.

DDD tried to help, even gave you some code and the command that he used. Go through his code, looking at each line, and figure out what is does. Then work on a camera to follow your car. Then come back and tell us you figured it out yourself.

If all else fails, use this code:


Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
DeepBlue
22
Years of Service
User Offline
Joined: 17th May 2003
Location: A little box in the UK
Posted: 26th Jul 2004 19:38
I don't think he's patched. Not sure but I think 1.08 trial or earlier never had the 'set camera to follow' command.

I've lost track of his threads all on the same subject so I thought I'd post it here (I think 1 thread would do!)

DeepBlue

The coder formerly known as Twynklet.
James Bond
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location:
Posted: 26th Jul 2004 23:04
then check out my new forum where i have tried to do the coding ........ the forum is with the subject "PLEASE CORRECT MY CODE" ---- or something smillar to that ...... u guyz can make corrections in my code for me .......... thankoo

Login to post a reply

Server time is: 2025-05-25 10:20:41
Your offset time is: 2025-05-25 10:20:41