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.

Code Snippets / Third Person Camera Collision

Author
Message
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 27th Dec 2006 02:42
Just a snippet I made for a question someone had, I thought Id post it here, its a basic way of making sure the camera doesnt go behind polygons in a non-first person game.



Not commented, pretty simple to understand.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 28th Dec 2006 22:33
Very clever. I always thought it would be something a little more complicated. Thanks for this.

Terrorist Zero
18
Years of Service
User Offline
Joined: 29th Aug 2006
Location: Teh YouKai
Posted: 19th Jan 2007 22:50
That's some really nice stuff, I'll probably have a go in a bit to get a smoother movement from close range to full range

www.tornupgaming.com
The home of free games and game projects.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 19th Jan 2007 23:15
Yep. That is what I usually do using Sparky's dll. Either that or my really cool camera system I made but haven't yet had a game to use it in. It does this but more stylishly! It smoothly curves the camera to the right position but, instead of letting the camera get pushed stupidly close up to the player, also checks all around the player for the best spot. The best spot is calculated by a ratio between how much space the camera would have there and how far the camera has to move from its current position to get there. It all works pretty well.

Login to post a reply

Server time is: 2024-11-23 00:38:52
Your offset time is: 2024-11-23 00:38:52