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 / i cant get object collision to work or object hit

Author
Message
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 25th Aug 2005 21:25
These commands work fine as long as you create collision boxes. However how am i supposed to detect collision on a rounded wall made from 3ds max?
Please dont tell me i need to buy tgm'ers dll file for collision detection. Cause thats retarded.
the only solution i can see is building an array with wall points to push objects back from crossing them. And a rounded wall is gunna take some nasty math ruitines to make shure i dont go threw the wall.

if hit object(x,0) actually worked i should not hafta make collision boxes.....it should just say wether anything is overlapping that object.....but ya doesnt work

any ideas?
G Man
20
Years of Service
User Offline
Joined: 17th Nov 2004
Location:
Posted: 25th Aug 2005 22:46
use the "Set Object Collision To Polygons" command.

Intel Pentium 4, 3.4GHz, 1280MB RAM, NVidia Quadro FX3000/256MB, 240GB HD, XP Pro
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 26th Aug 2005 00:07
i believe i tried that.....but ill give it another go

thanks
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 26th Aug 2005 03:04
no that didnt work
it only works if ya make collision boxes
RiiDii
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 26th Aug 2005 17:51
Try using the intersect object command. I haven't played with 3ds files much, so I don't know if it will work, but it's easy to test so it's worth a try.

G Man
20
Years of Service
User Offline
Joined: 17th Nov 2004
Location:
Posted: 26th Aug 2005 18:41
Here is a working sliding collision routine that should show you how to do collisions:

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

You will note that there are some known funkiness issues with DBPro's indigenous collision routines, but if you read the above linked thread, you'll see how we got around them.

Intel Pentium 4, 3.4GHz, 1280MB RAM, NVidia Quadro FX3000/256MB, 240GB HD, XP Pro
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 27th Aug 2005 18:36
ya none of that works for my application.

with intesect object you would idealy make a collision box. i need a collision curve around a rounded wall
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 30th Aug 2005 03:43
ah! i sorta figured out the rotating collision boxes.....this will work for an angle slide ....not quite rounded but it will do
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 10th Sep 2005 04:46
ah.....i think actual math detection works a hell of alot better then any of those collision commands. And it works just as fast.. i dont see any lagging because of it.... i highly recommend doing collision detection judging by distance between the object you dont wanna walk threw.

and if ya wanna make a stair way effect this is sorta how it goes...

i detect if your <10 from the upper side of the object....so if ya walked towards the next it wouldnt dead stop ya...it would lift ya onto the next platform.

also the key to sliding collision on a mathematical detection is very simple.

first detect what side you are closer to on the object. its either on the z axis or the x axis. simply reposition the object to the outer edge of whatever side hes on witch will produce a sliding collision effect.

you can only do this with boxes however....but thats ok.

and on the x and z axis....you might notice your character will catch on the next ledge if an object is right next to it..

fixing one side was easy .... simply push x or z farther away would make one of those axeses to have perfect sliding....figuring that out this is what makes it fully slide

find out what angle your character is facing and simply according to that judge witch x or z to push out further then the other..


ya perfect sliding collision for a platform game that im working on


for those that dont understade a thing i said....say a box is 100,100,100

to do a detect wether your inside the box would be sorta like this:

if object position x(1)>object position x(x)-55 and object position x(1)<object position x(x)+55 and object position z(1)>object position z(x)-55 and object position z(1)<object position z(x)+55 and object position y(1)>object position y(x)-90 and object position y(1)<object position y(x)+55 then maby=2

the reason why y axes detects so low is because you dont want your characters head to go threw the bottom of the box.

my character wasnt a size 50 diameter either he was about a 40 hence the -90

anyways have fun experimenting with that one.

Login to post a reply

Server time is: 2025-06-07 09:24:51
Your offset time is: 2025-06-07 09:24:51