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 / can u stop the camera

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 11th Mar 2004 13:10
is there anyway u can stop the camera from moving through objects

*=========**=================*
*.-steve-.**.-slipknot rule-.*
*=========**=================*
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 11th Mar 2004 15:27
First, ditch the move camera/position camera commands after the detection of input. Then, put a 3d object (cube, high-poly animated dude, whatever) in the scene. If the user presses a key make the object move, not the camera, then position the camera where the object moves. You can then check for collision on the object, and since the camera only moves when the object moves you get the illusion of camera collision.

Crazy Donut Productions
Current Project: KillZone
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Mar 2004 15:40
I take this one step further, less economical on processing, but effective.

I move the camera using SET CAMERA TO FOLLOW (Which suits my needs perfectly). Then I move the camera's hidden box to the same position, perform collision detection and move the camera a second time to adjust if necessary.

This creates fantastic camera movement in my racing app, allowing the camera to move between vehicles without colliding.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 13th Mar 2004 22:18
ime really sorry this may sound stupid but ime having trouble whith it i cant do the whole thing i positioned a sphere in front of the camera and i cant do the movement thing it doesent work right can somone give me some code for it pls

*=========**=================*
*.-steve-.**.-slipknot rule-.*
*=========**=================*
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 20th Mar 2004 22:41
pls help

*=========**=================*
*.-steve-.**.-slipknot rule-.*
*=========**=================*
KC27
21
Years of Service
User Offline
Joined: 18th Mar 2004
Location:
Posted: 21st Mar 2004 01:37
something like:

if camera position z = whatevercollisionwithvariblehere then camera position z = whatevercollisionwithvariblehere then

KC27
21
Years of Service
User Offline
Joined: 18th Mar 2004
Location:
Posted: 21st Mar 2004 01:38
That should work, if not, IM me at wmg101 and I will try to help you.

Login to post a reply

Server time is: 2025-05-31 17:45:59
Your offset time is: 2025-05-31 17:45:59