Posted: 8th May 2003 5:01
Would it not be better to do the test from the player's y-value? That way, no matter how high or low the player is, the test should work (shouldn't it?)
Posted: 13th May 2003 1:26
Right now, I'm working on using intersect object to make a psuedo BSP style sliding collision on any .X object/level/terrain. I have sliding box collision working, but I need it to slide at any angle. BSP support in DBPro sucks at this point. I also want to be able to have the same sliding collision as a BSP, except in an outdoor type setting. So, once I have this completed. I'm going to see if I can get it hosted for download here and on RGT. If it's good enough, I'll see if the DBS team will just make it into a command so BSPs can just be chucked. I might post for help on doing the physics. I know someone posted a DLL for .X Sliding collision, but it looks way too complicated. DBPro is supposed to be a BASIC language, so I'm aiming for an easier way to accomplish this.

-Kensupen
Posted: 13th May 2003 1:32
Oh yeah. I forgot about the DBC issue.

The only way this would ever work in DBC is if someone made a DLL or other way(memblock, etc.) to detect the distance between two points and see if there is a polygon in that vector. This is way outta my range of programming. If someone invents that for DBC then this code could be slightly modified to do the same thing.

I attempted a generic way of doing this earlier, but it chewed up CPU and didn't work all that great. What I did was load an .X landscape and set it to polygon collision. Next I did a for loop to check from a certain height (Usually the top of the model) to a negative height with setting a sphere to those heights and then checking collision. It was slow.

I just use intersect object. One of the added features of DBPro.

-Kensupen
Posted: 27th May 2003 21:55
Very interested in seeing how this plays out, please keep us "posted" Sliding Collision sucks in DBPro, so i'm looking all any manner of alternate means. Can't wait to see what comes out.
Posted: 28th May 2003 12:45
http://www.darkbasicpro.com/apollo/view.php?t=10315&b=6

That's how it played out so far, if at all interested.
Posted: 5th Jun 2003 1:00
hmm.. i used a matrix like .x model and this didnt work i used the

+ Code Snippet
height#=100001-intersect object(1,px#,100000,pz#,px#,-100000,pz#)

like the get matrix height command is there somthing missing
Posted: 5th Jun 2003 13:46
What was it doing/not doing? Just didn't work is a little vague. If you can give me more detail, I'll get it working for you.

-Kensupen
Posted: 5th Jun 2003 21:36
well its a matrix-like object like i said but it wouldnt give me the height it just kept it at 1 height and didnt change like it wasnt getting height, and the object number is supposed to be the number of the matrix object right
Posted: 7th Jun 2003 2:42
That code I posted only checks against object number 1. If your model isn't object number one, then it won't return any values. You can do one of two things if it isn't.

1. Change the number in the intersect object(1,blah,blah) to the number of your model.
2. Load the model as #1

If that's not the problem, re-post and I'll help you sort it out.

-Kensupen