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 / Camera Angle Problem

Author
Message
Rabid Spatula
22
Years of Service
User Offline
Joined: 5th Mar 2003
Location:
Posted: 10th Jul 2003 03:42
I'm working on a 3rd person space combat game and I'm having trouble getting the camera to stay right behind the player ship. I based the 3rd person positioning on the example included in the DBC user manual tuts. It works fine when working on a 2d plain, but when I tried to convert to 3d it got screwed up big time. What is wrong? I've attached my movement and camera angle code. Thanks!
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 10th Jul 2003 06:55
I think I found it...This is only part of your code, right?

You can't use the aY# for the X, Y, and Z angles for placing the camera. Only for the newxvalue and newzvalue commands. For the newyvalue command, use a different angle. Not quite sure what, but play around with it. I will experiment and try to figure out also.

Oh yeah, check out the sample program in DB for free flight. It uses an camera placed behind the object in 3D movement. It should work perfect.

Good Luck

Xander
Bolt of Bolt Software Productions
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 10th Jul 2003 11:01
cy#=object position y(1)+100 'any other number experiment
point camera x#,y#,z#'you want to point the camera at your object not at angles

that should help

hi guys
Rabid Spatula
22
Years of Service
User Offline
Joined: 5th Mar 2003
Location:
Posted: 11th Jul 2003 06:53
Thanks guys has helped some what, but the problem is it now locks on the ship's position and the camera doesn't follow behind and above it. Has something to do with my camera positioning. This is really confusing :-s

ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 11th Jul 2003 12:26
if you just replace the line


with


and


with


then it should work fine

hi guys

Login to post a reply

Server time is: 2025-05-20 01:40:34
Your offset time is: 2025-05-20 01:40:34