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 / Sliding collision help please =]

Author
Message
Malboro Jones
14
Years of Service
User Offline
Joined: 10th Dec 2009
Location: Wales - UK
Posted: 6th Feb 2010 14:04
Hellow. Could someone explain sliding collision to me please. Tried it a few times but cant get it to work!!

What's the best way to achieve it?

Thanks Malb

Don't make war, make tea.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Feb 2010 15:38
There is a great example in the db directory in "\help\examples\basic3D\exam25.dba" or something like that. I'd check that one out, change some values, and figure out how it works.

TheComet


Make the paths of your enemies easier with WaypointPro!
Malboro Jones
14
Years of Service
User Offline
Joined: 10th Dec 2009
Location: Wales - UK
Posted: 6th Feb 2010 15:47
That's what I tried . I'm using a castle I modelled my self. Using sparkys DLL for height finding.Is it possible to do without making the castle static?

Don't make war, make tea.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Feb 2010 17:50
Tutorial 10 here explains the basics of collision in simple terms:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

It doesn't use Sparky's, it uses DB's built-in collision, but when you understand that, Sparky's is a lot easier to use.

TDK

Malboro Jones
14
Years of Service
User Offline
Joined: 10th Dec 2009
Location: Wales - UK
Posted: 7th Feb 2010 21:25
Thanks that helped with the understanding but I still have no idea on how to use sparkys DLL to figure the sliding data on a complex object . I'll keep at it though. I'll get there eventually!!

Don't make war, make tea.
Malboro Jones
14
Years of Service
User Offline
Joined: 10th Dec 2009
Location: Wales - UK
Posted: 7th Feb 2010 21:44 Edited at: 7th Feb 2010 21:46
If I used:
getCollisionBounceX()
getCollisionBounceZ()

for the "wall feeler" and then rotate it to those values and position it at:

getStaticCollisionX()
getStaticCollisionZ()

Then move that forward by 1, that should sort of be a sliding effect should it not??

I'll give it a try and let yawl know.

Don't make war, make tea.
Malboro Jones
14
Years of Service
User Offline
Joined: 10th Dec 2009
Location: Wales - UK
Posted: 7th Feb 2010 22:38
Right then, I have sort of managed to make a sliding collision using the DLL:



For some reason it only works on one side of a wall e.g. it will go straight through a wall and then will slide when the other side is hit :S

Could someone see if they can perfect it for me please

Thankss

Don't make war, make tea.
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 8th Feb 2010 16:46
Have a look to this code.


cheers.



learning every day

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-27 00:29:43
Your offset time is: 2024-04-27 00:29:43