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 movement problem

Author
Message
Killonyas Slayer
20
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 10th Sep 2005 03:16
heres my function:



well, my problem is that when turning, the cube goes to the right, how would i keep the camera right behind the object when turning.

thanks in advance
-Timesplitter-

-"I'm over twice as strong as I was when we last met"-
-"Good, Twice the fall, double the glory"-
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 10th Sep 2005 03:28
Do you really need a function for that?

There are many other simple ways to have thrid persons view... If you need those ways, just ask me.
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 10th Sep 2005 04:39
lol, just go to the code base and your sure to find some camera codes there. or just goto retro gaming comp and download Girls From the Block. Several nice camera angles in the source included

Games I am releasing:
Dragon Stone I : Journey to Achilles Dungeon - 2006?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Sep 2005 05:58
SET CAMERA TO FOLLOW



TDK_Man

master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 10th Sep 2005 11:32
Yeah, the set camera to follow would work, as well as some tricky math commands and curvevalue and interpolation between curves, which can be done via the curvevalue command. (Don't know it off the top of my head, sorry)

Killonyas Slayer
20
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 10th Sep 2005 20:17
Thanks everyone, i like to use functions, because i just put them into a source and can keep my base code short. I'll check out code base and how that Set camera to follow works(see if it's any good).

-timesplitter-

-"I'm over twice as strong as I was when we last met"-
-"Good, Twice the fall, double the glory"-
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Sep 2005 04:38
Quicker to just press F1!

Quote: "SET CAMERA TO FOLLOW
This command automatically controls the camera to provide a tracking system. By providing the 3D world coordinate of the entity you wish to track, and some camera data your camera will automatically update its current position each time this command is called. The X, Y, Z and Angle values provide the coordinate to track. The Camdist value specifies the required distance between the coordinate and the camera. The Camheight value specifies the required height of the camera in 3D space. The Camsmooth value specifies the level of smoothing required for the camera, where a value of 1.0 is no smoothing and a value of 100.0 is lots of smoothing. The Colflag value is a special flag that allows the camera to detect whether it is hitting any of the static collision boxes and if set to one will automatically adjust so as not to enter these collidable areas.

SYNTAX
SET CAMERA TO FOLLOW X, Y, Z, Angle, Camdist, Camheight, Camsmooth, ColFlag "


TDK_Man

Killonyas Slayer
20
Years of Service
User Offline
Joined: 13th Apr 2005
Location: Mozerok,Eartreg
Posted: 18th Sep 2005 10:01
Ok, thanks everyone, I got my camera the way I want it now.

-"I'm over twice as strong as I was when we last met"-
-"Good, Twice the fall, double the glory"-

Login to post a reply

Server time is: 2025-05-22 13:11:39
Your offset time is: 2025-05-22 13:11:39