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.

DLL Talk / Sparky DLL: Inaccurate collision problem

Author
Message
Geddon00
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location: USA
Posted: 26th Feb 2006 20:50
Whenever I move the sphere object into one of the boxes, the collision seems to be detected in the center of the sphere, not the polygons of it. Can anyone tell me how to fix this?

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Feb 2006 15:03
That is the nature of ray collisions, an very thin line, rather than a sphere.

Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 27th Feb 2006 18:14
Cast the ray from the edge of the sphere.

Geddon00
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location: USA
Posted: 27th Feb 2006 21:02
I'm new to this dll, can you please tell me how to do that^?
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 28th Feb 2006 09:26 Edited at: 28th Feb 2006 09:29
sparky,

i use your dll in a dbc game, and in one level of the game i use plains and not boxes/cubes to build the levels.

when the player walks on the floor and then encounter a small wall like this:



he sometimes fall under the wall and gravity pulls im away from the world.

is this my ultra leet level editing skills, or code, or is it actually your dll that cant handle plains as good as boxes/cubes?

the problem have not occured on boxes/cubes.


edit:
Geddon00,
you may want to know the size of the sphere and then cast the ray from the position +/- the size of the sphere.

HorizShootiz progress 1337% :/
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 28th Feb 2006 10:39
Here you go man ! (I hope you have DBPro as this is written for that...if you don't, then just say and I'll write a DBC version)

Ok put this at the start of your program somewhere (before your main loop)


now this is the command you use to cast a sparky collision ray off a sphere.


Ok so how to use it...Just like normal...the OldX oldY and OldZ are still going to be the center of your sphere but at the start you specify the size of the sphere....and then it does the rest!

Hope it helps, if you want any information on how it works...or need a version to work on DBC then just post and I'll get right on it.

Geddon00
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location: USA
Posted: 28th Feb 2006 21:35 Edited at: 28th Feb 2006 21:38
Thanks a lot! I'll test it out now.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 1st Mar 2006 06:35
Anytime, let me know how it goes !

Login to post a reply

Server time is: 2024-11-22 00:30:35
Your offset time is: 2024-11-22 00:30:35