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 / how can I check limb collision ?

Author
Message
Load static object
23
Years of Service
User Offline
Joined: 18th Mar 2003
Location:
Posted: 4th Apr 2003 13:16
load object "man.x",1
make object sphere 2,10

how can I check when sphere collision with limb 15 of object 1 ? ( IN DB not DBPro)
arras
23
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Slovakia
Posted: 4th Apr 2003 14:11
There is not existing comand for that. Sorry...

What I am doing is to give each limb data about size, angle, offset and centre position (you can store it in arrays) and make box around limb when checking for collision of that limb. You can do it mathematicly or making box object and use inbuild collision comands.

Other way I think it would work is to make parent object with limbs but no mesh, then make each limb separate object and position object at limb position and rotation it belongs to.

rockfistus
23
Years of Service
User Offline
Joined: 31st Mar 2003
Location:
Posted: 5th Apr 2003 04:39
Yeah, there is no command for that, there are some work-arounds though that aren't perfect but might be good enough, like if Limb15 is the "head" then use Object_ScreenY() during collision to check and see if the sphere is high enough to to be touching the head.

just a small example, I'm sure you'll think of something.

indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 5th Apr 2003 06:30
u can glue things to a temp limb skeleton and check on those 3d objects glued I suppose

arras
23
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Slovakia
Posted: 5th Apr 2003 19:23
to indi:

You cant! If you glue object to limb, DB stops to detect collision for it correctly. It detect collision at the place where object was before glueing. You can unglue object for collision check and then to glue it again afther of course, but that doesnt work as well, because if you unglue it, all the rotations and offset will be reset to 0...

I was already asking if thats bug, but I got no response.

I would like to know if its like this in DBpro also, so those of you, who use pro, can you please look at it may be?

...thx

indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 6th Apr 2003 06:57
so once its glued it loses it collision huh?

ok if glueing isnt the key then you could position and rotate with maths the objects to the body but what Ive found is that the objects attached this way have a slower pick up than the turning limbs at high speeds causing a lag and delay when they move at high speed turns etc.

Hell IVIonkey
23
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 6th Apr 2003 12:47
I believe that depends on how and when you handle the movement of the limb and the parent object in the game and when you choose to sync.

Login to post a reply

Server time is: 2026-06-11 15:09:25
Your offset time is: 2026-06-11 15:09:25