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 trouble

Author
Message
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 13th Aug 2005 11:44
you know in 3rd person perspective games when you back up against a wall and the camera comes closer to the player well in the games i make when the character goes against the wall the camera just stays behind the wall so you cant see the character until you get far enough away from the wall so you can see the player again heres an example code. so can someone please help me.
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 14th Aug 2005 10:01
Quote: "Error obtaining Source Code, invalid ID. Sorry but I've given up.
"


sorry m8, no code.

Immunity and Annihalation makes Immunihalation...
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 14th Aug 2005 15:41
its about time TGC fixed that bug

"Well if she dies it'll teach her not to do it again..." - Me
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 14th Aug 2005 22:22
oh let me try again
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 15th Aug 2005 14:24
put it in a code snippet like this


The happenings of tommorow are behind us now
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 18th Aug 2005 00:22


Also, to open code snippets, you .. click on them.

[Insert extremely witty comment here] :: Add me to MSN if you like, but don't expect any big favours [unless you like VB6]. ... IDK!!
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 7th Sep 2005 20:39
ok here it is
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 7th Sep 2005 23:08
all you need to do is make the object stop a little short of the wall, say by detecting collision with a hidden cylinder you have follow the model about, then set the camera near range to just short of the model, that way anything closer to the camera than the model will get culled, you use the command

set camera range near,far

near removes anthing up to that distance and far removes anything beyond that distance, so if your model is 2 units away and stops 1/2 a unit from a wall then something like

set camera range 1.51,2000

will make sure that the wall is culled.



the average IQ is 100...but the people that took the test where trying to look smart. most people don`t go over 50.
Area 51?, I`m more intrested in what they have in areas 1 to 50

Login to post a reply

Server time is: 2025-05-22 09:10:23
Your offset time is: 2025-05-22 09:10:23