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 Professional Discussion / Collision in complex objects

Author
Message
Bjack55
13
Years of Service
User Offline
Joined: 25th Jul 2012
Location:
Posted: 26th Jul 2012 12:55
Hi, I'm trying to simulate a charachter moving into a labyrinth and then he moves into a house through a door.

I found difficult to set the collision because using simple collision
code
load object "man.x",1
load object "wall.x",2
set object collison on 1
set object collision on 2
if object collision(1,2)=1 then move object 1,-2

but either the labyrinth and the house have a "Cube" setting for collisions so the charachter stops before entering.

What could I do to set the collisions on the complex object shape

I want to excuse me for the noob's question but it makes me mad.
Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 26th Jul 2012 15:49 Edited at: 26th Jul 2012 15:50
You'll be wanting to use a plugin for collision really. The built in collision is fairly poor and quite slow.

Sparky's Collision DLL - http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5
This is great for basic collision handling and is free.

Dark Dynamix - http://www.thegamecreators.com/?m=view_product&id=2318
An excellent full physics solution based on PhysX. This will do your collision handling but also covers things like ragdoll, cloth and vehicle physics. My personal choice.

Hope this helps.


Previously TEH_CODERER.
Bjack55
13
Years of Service
User Offline
Joined: 25th Jul 2012
Location:
Posted: 26th Jul 2012 21:50
I'll try the free one could you suggest me a tutorial or a guide for using that plugin ( I'm a little inexperienced)
Andrew_Neale
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 27th Jul 2012 02:08
If I'm not much mistaken, Sparky's Collision DLL comes with a couple of examples which you should be able to pick up the basics from. Take a look at those and if you're still unsure afterwards then let me know and I'm sure I can put a quick tutorial together for you.


Previously TEH_CODERER.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jul 2012 05:15
Time for me to shamelessly advertise my code.

http://forum.thegamecreators.com/?m=forum_view&t=187644&b=6

TheComet

Bjack55
13
Years of Service
User Offline
Joined: 25th Jul 2012
Location:
Posted: 27th Jul 2012 12:40
thank you very much I'll try and I let you know soon.

Login to post a reply

Server time is: 2026-07-10 09:46:09
Your offset time is: 2026-07-10 09:46:09