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.

Newcomers DBPro Corner / How can i check camera collision?

Author
Message
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 25th Jun 2008 19:40
I'm currently trying to do something in a first-person view point, using the standard WASD for forward back and strafe left and right and using the mouse for "looking". Now the only problem i have encountered now is moving through solid objects... i'm not sure how to make the camera "collide" with the objects to stop it moving through them, it's probably something blindingly obvious but i just can't seem to figure it out, any help is much appreciated.
Ta.

I can see from your smile, you're not here for the sunset.
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 25th Jun 2008 20:29
Attaching the camera to a sphere and toggle collision on the sphere is a good way to make "camera collision".
Putting the camera above the sphere will make the camera stay higher.

Though remember to hide the sphere or else it will be visible when looking down, and that is kinda unprofessional.

I have no code examples though, I don't know how to code it either. This is a way to make camera collision I saw in Silent Shade.

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
Levanthus
21
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 25th Jun 2008 22:56
Yup i figured it'd be something that simple... thank you

I can see from your smile, you're not here for the sunset.

Login to post a reply

Server time is: 2024-09-27 16:32:54
Your offset time is: 2024-09-27 16:32:54