Blitz3D Collision Example Fix (better way?)

Blitz3D Forums/Blitz3D Programming/Blitz3D Collision Example Fix (better way?)

kerrill(Posted 2007) [#1]
After getting recent Blitz3D Update, retried the Collisions Example in the manual, but the collisions didn't work as expected (see ***** box in code). Finally discovered a fix that seems to work. Anyone have a better way to do this? Is this really a bug or am I doing something wrong?

(This is my first actual post; if I'm doing something the wrong way or in the wrong place, please let me know.)



FYI, last night, before Update from 1.64 (I know, a little procrastination going on for several months...."If it ain't broke, don't fix it...."), the example worked for me. So, wondering what changed. BTW, the reason for the indepth Collision study was to see if possible to use Sprites in Collisions with 3D. Apparently, it works okay for ellipsoid-to-sphere and ellipsoid-to-box but not ellipsoid-to-polygon. Anyone know if it's safe to use Sprites in Collisions?

My revised example actually shows the semi-transparent EntityRadius/EntityBox areas, so in any case it's an okay way to really kind of visualize how these Collisions work. I think I kind of "get it" now?! Glitch-solving can be quite educational, but it sure does take a lot of time and lost sleep!!!

Does anybody know of a better way to get the example to work without the ClearCollisions command (and, of course, the resetting of all the desired Collisions)?

Thanks :-)


Sledge(Posted 2007) [#2]
Well, clearing a collisions rule before redefining it seems to be the correct procedure now (came across it recently also). The example is most likely out of date (and if it's in the physical manual then thank goodness for print-on-demand!) but you might want to make a bug report and see if Mark intended this behaviour (because it does mean reiterating every single collision rule in order to alter a single one).


Subirenihil(Posted 2007) [#3]
Sprites can be used in collisions - just be sure to use box or sphere for their collision type, don't use polygon. For that matter, pivots can be used in the same manner (it has it's uses...).


kerrill(Posted 2007) [#4]
Thanks for the replies. Guess I'm on the right track. So, I'll make a note: "Always do ClearCollisions first if changing a Collsion definition."

but you might want to make a bug report and see if Mark intended this behaviour (because it does mean reiterating every single collision rule in order to alter a single one).
- Where is the best place to post it - Blitz3D Bug Reports or Blitz3D Manual ??

I hadn't really thought about using a pivot in a collision - interesting idea. I had a problem with my camera viewing OUTSIDE of the world cylinder. Maybe there's a way to create a pivot point collision check to avoid this. Or as the above link brought up, maybe using an invisible cube as "feet" for the camera may be an idea. I guess I'm understanding Collisions better now - maybe just need a bigger CollisionRadius on the camera. Any other ideas for keeping the camera inside walls??


Sledge(Posted 2007) [#5]

Where is the best place to post it - Blitz3D Bug Reports or Blitz3D Manual ??


Start with the Manual - it's more likely to be an oversight in the code than a bug in Blitz, thinking about it.