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 / third person camera collision

Author
Message
ciotobot
15
Years of Service
User Offline
Joined: 9th Aug 2009
Location:
Posted: 16th Aug 2009 19:15
i`m using sparkly collision plugin and i don`t know how to make third person camera with collision. Please HELP
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 16th Aug 2009 23:36 Edited at: 16th Aug 2009 23:37
I guess you have to use sliding collision then. here's a little demo if how you could do it:

http://forum.thegamecreators.com/?m=forum_view&t=89539&b=1

This is what you can do:
1. Save the camera's old position
2. Place it at its new position
3. Do a sphereslide with the old and the current camera position
4. Position the camera at the result position

If you need a demo tell me, and i'll see if i can make one.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 17th Aug 2009 01:50
Actually what I do is just cast a ray from the the camera to the player. If the ray collides with something, move it up to the collision point and then a little further and repeat until it doesn't hit anything. This has the advantage of also preventing objects from getting between the camera and the player.



ciotobot
15
Years of Service
User Offline
Joined: 9th Aug 2009
Location:
Posted: 17th Aug 2009 03:10
i would be very grateful for some demo
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 17th Aug 2009 07:05
Here's a basic example:



Any questions, please ask.



ciotobot
15
Years of Service
User Offline
Joined: 9th Aug 2009
Location:
Posted: 17th Aug 2009 12:11
it works great! Thanks

Login to post a reply

Server time is: 2024-11-24 03:10:25
Your offset time is: 2024-11-24 03:10:25