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 Professional Discussion / 3rd Person Camera Issue

Author
Message
Mattman
22
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st May 2005 05:58
Alright, so I have this cube. And I'm following it. And I wanna turn with it. The way I do it I turn, but I stay in the same X and Z which I don't want. How would I do that? Am I clear enough? It's gonna be something about going around in a circle around the cube I'm guessing.

Thanks,
Matt

My less-pimp name was Mattman.
DBAlex
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 1st May 2005 06:08
um yrotate camera 1,object angle x(1)?

1 being the cube object number...

post some code... It will help...


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
Mattman
22
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st May 2005 06:11 Edited at: 1st May 2005 06:11
No see, that just rotates the cameras orientation, i wanna move it to, so it stays the same exact distance from the object, get it?

[edit] I just got the idea of making a limb off to the side and putting the camera there, hang on lemme try it out [/edit]

My less-pimp name was Mattman.
Mattman
22
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st May 2005 06:23
Well it's getting really frstrating. I added the limb, and offset it, then set i need to link it in order. so i linked it so 0, guessing thats correct because theres no limbs on a ficking cube. i really need some help on how to set up the limb system.

matt

My less-pimp name was Mattman.
Ace Of Spades
20
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 1st May 2005 06:25
look up "newxvalue" and "newzvalue" commands.

Digitalmodr
Coder_David
[Apolloed ]
games coder
20
Years of Service
User Offline
Joined: 2nd Feb 2005
Location:
Posted: 1st May 2005 06:26
To let the camera follow an object, use newxvalue and newzvalue like this:

to place the camera at dist# distance from object b, and at h# height above object whose y-angle is ang#. Is this what you are looking for?

http://www.freewebtown.com/rioplata
http://rioplata.iwarp.com/
Mattman
22
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 1st May 2005 06:41
Looks like it would work but it don't. I can't show my code because it's on another pc (with no internet or floppy drive)

My less-pimp name was Mattman.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 1st May 2005 07:36
The following code is taken from the BlueIde code library so I am assuming it is RobK's work (although I may be wrong). I believe it is what you are seeking.




Coder formerly known as Scraggle
Clueless
21
Years of Service
User Offline
Joined: 16th Feb 2004
Location: Corbin, KY, USA
Posted: 2nd May 2005 05:32
What's wrong with SET CAMERA TO FOLLOW?
Mattman
22
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 3rd May 2005 07:47
Because I'm using a two camera system and it would be easier to do it my way.

[will test code later]

My less-pimp name was Mattman.
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 4th May 2005 00:31
I have to agree with Clueless. Set camera to follow has easy to use distance and angle control which makes orbitting a cube a snap, just add a point camera command to keep it focused on the center. Plus, you can optionally specify which camera to act upon so you can set each camera differently.

Of course, I don't know the full scope of the problem. So, there might be something preclude the use of set camera to follow.
--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 4th May 2005 12:25
yeah

Narf The Mouse
20
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 4th May 2005 12:44
position camera [Your Camera here], object position x( [YOh] ), object position y( [YOh] ), object position z( [YOh] )
rotate camera [YCh], object angle x( [YOh] ), object angle y( [YOh] ), object angle z( [YOh] )
move camera [YCH], [A negative distance that should be somewhere around the height of your character]

ie.,

position camera 1, object position x( 1 ), object position y( 1 ), object position z( 1 )
rotate camera 1, object angle x( 1 ), object angle y( 1 ), object angle z( 1 )
move camera 1, -200

I like adding + 30 to the X angle; it gives a nice downward slant.

Cheese!

Expert Bug-Finder, Horrible at Identifying Them.
Clueless
21
Years of Service
User Offline
Joined: 16th Feb 2004
Location: Corbin, KY, USA
Posted: 5th May 2005 11:44 Edited at: 5th May 2005 11:45
Quote: "What's wrong with SET CAMERA TO FOLLOW?"

Quote: "I'm using a two camera system"


It supports multiple cameras, at least in the version of DBP I've got... maybe that's still not what you're after though. At least you've got a few different methods to choose from.

Login to post a reply

Server time is: 2025-06-17 06:04:35
Your offset time is: 2025-06-17 06:04:35