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 / Another Question (Follow Camera)

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 15th Mar 2003 11:44
I'm making a basic space sim and I want to have a sort of 3rd person view with the ship in front of you. I'm using the 'Set Camera to Follow' command to make it follow the plane but I don't think I quite get it. This is the code:



I don't think I understand how the camera to follow thing works properly (or maybe I have the wrong use for it), but after I rotate the ship left and have an angle greater then around 90 degrees the camera slowly stops following it and eventually I can end up looking head on with the ship model. How do I make it follow the whole way around? And also follow the pitch of the ship as well, I'd like the camera to move down as I pitch up or up as I pitch down, any ideas?
"Computers are useless they can only give you answers."
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 15th Mar 2003 13:27
use...

rem height# = dist of cam above ship
rem dist# = dist of cam behind ship

cX#=newxvalue(pX#,pA#,0-dist#)
cZ#=newzvalue(pZ#,pA#,0-dist#)
cY#=pY#+height#

position camera cX#,cY#,cZ#
point camera pX#,pY#,pZ#

Or something like that.

Why the hell'd you ask me for crying out loud!?!
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 16th Mar 2003 02:08
Ahh, worked out the problem, I was making the ship gradually turn faster rather then having it turn at a constant speed. Now that it's constant it works fine, thanks. =)

"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2024-11-12 23:53:16
Your offset time is: 2024-11-12 23:53:16