Steps to build a custom entity shape
Posted: Sun May 15, 2016 2:29 am
As I dig myself further into this neat little hole...
I want to build a custom entity shape - one that is non-convex and generally a giant mess of weird-shaped-ness.
What are the proper steps to go about doing this?
I have made an initial series of attempts of course...:
- I have the shape object.
- I have the collidable object.
- I have all the same types of pair handles as one would find in static shape, registered to the narrowphase and all.
And ... it works nice... When the mass is 0, and the object isn't moving. Things bounce off it as they should.
The problem is, it doesn't recognize anything in its way when mass is set above 0 and it needs to actually move in itself. It just casually flies through everything.
My debug output shows it is recognizing that there are solid objects in the way and detecting collision as normal... it's just not reacting.
So what step am I missing? What is required here to make the entity recognize things that block its path, and impact against them instead of fly through them?
(Note: Ray/convex tracing hasn't been coded yet, but that shouldn't be a problem here, I don't think? The velocities are relatively low, and the objects involved are all thick and solid.)
I want to build a custom entity shape - one that is non-convex and generally a giant mess of weird-shaped-ness.
What are the proper steps to go about doing this?
I have made an initial series of attempts of course...:
- I have the shape object.
- I have the collidable object.
- I have all the same types of pair handles as one would find in static shape, registered to the narrowphase and all.
And ... it works nice... When the mass is 0, and the object isn't moving. Things bounce off it as they should.
The problem is, it doesn't recognize anything in its way when mass is set above 0 and it needs to actually move in itself. It just casually flies through everything.
My debug output shows it is recognizing that there are solid objects in the way and detecting collision as normal... it's just not reacting.
So what step am I missing? What is required here to make the entity recognize things that block its path, and impact against them instead of fly through them?
(Note: Ray/convex tracing hasn't been coded yet, but that shouldn't be a problem here, I don't think? The velocities are relatively low, and the objects involved are all thick and solid.)