Sharper colliders

Blitz3D Forums/Blitz3D Beginners Area/Sharper colliders

fox95871(Posted 2009) [#1]
A while ago I posted some stuff in this thread, but it never got answered:

http://www.blitzbasic.com/Community/posts.php?topic=82329

Anyway, that was someone else's thread, so I'm starting my own now. I didn't word it too well there either, or I guess I just thought of a better way of asking the question, which is how can you get sharper colliders? What I mean is, it's still a sphere no matter what you do with it, so it inevitably floats around when it's near any corners and gravity's on, and "Slide, but not down" doesn't always work, as you can see in the above link's example. The person who started that thread was always having the character slide off edges, which I noticed when I first started messing around with collisions but figured everyone must know how to fix. That doesn't seem to be true though. My fix was to make the collision sphere a strait up and down pencil, basically. It worked, but caused major clipping problems. So I figured maybe have four all connected, like this:



That, or somehow getting a cube or some other sharp mesh to load as a collider would be ideal I think. Someone also suggested the Driver demo to me, but that was a little more complicated than what I'm looking for, since my character doesn't need traction, bounce, and whatever else that code had, impressive as it was. I just need the effect of an octagonal cylinder basically, now that I think about it.

Sorry this was so wordy, I hope people will have some equally wordy suggestions though!


Zethrax(Posted 2009) [#2]
Personally, I've never gotten much sense out of elliptical collisions, so for a game character I think you'd better off using multiple spherical collision zones and arranging them vertically. Try repositioning them relative to each other (or to a particular one of them that defines the basepoint of the character) after each movement, so that they move as a rigid cluster.

If you need more precise collisions, then you need to either look at convex hull collisions or a physics engine. You should find both by browsing around this site.


fox95871(Posted 2009) [#3]
Physics engine... could that be used with Blitz media linker, or is it a dll or some other kind of outside file like that?

I looked up convex hull collisions, and it seems like they're always features of someone's existing engine, not code I could put into my own. I also read here and there about problems with speed when using convex hulls, and friction or something caused by them not being sphere based. So at this point I think I'm going to go with my original idea of having four colliders fused together, except now with eight. I did that once before and it resulted in them not staying together, but I'll put up an example in a few days so hopefully someone can show me how to make them stay together this time.

Thanks for the help so far!