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.

3 Dimensional Chat / code problems - how to get camera to follow jet fighter

Author
Message
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 29th Oct 2003 12:52
hi, i have loaded an object in darkbasic pro, which moves forward/left/right, and pivots up/down and rolls, however my camera does not remain behind the object at all times, has anyone got any suggests for my code, which will keep the camera behind the plane at all times - thanks everyone
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Oct 2003 13:29 Edited at: 29th Oct 2003 13:31
I haven't got DBPro handy, so this is top-of-the-head stuff, try it though - might work.

First thing is, make a 3D distance formula, I reckon something like:



Don't quote me on that, it's similar, but I don't know if it's right.

I'd use this to position the camera at a set distance away from the object:



Just call flycam(playerobject,distance#) every loop.


Van-B

bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 1st Nov 2003 11:37
thanks VanB, i've tried it loads but still no luck, thanks for having a go tho, i'll get there eventually lol
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 2nd Nov 2003 06:36
Here's a good example of a camera following object 1.
--
TAZ
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 2nd Nov 2003 11:32
hi taz, i can't see your solution lol
tomazmb
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Slovenia
Posted: 2nd Nov 2003 15:19
Hello,

Look at his post --> SOURCE

Have a nice day,

Tomaz

Why some people take programming so seriously ?
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 2nd Nov 2003 16:27
that worked brilliantly, thanks for u'r help everyone

Login to post a reply

Server time is: 2025-05-13 09:15:41
Your offset time is: 2025-05-13 09:15:41