Custom convex shape sweep test?

Hey guys.

I’m making a custom physics routine for my platformer. I want to represent the player as a diamond that can change in shape (Grow left/right/up/down). My only requirement for doing this is being able to do a sweep and overlap test against the static world with a custom convex shape. FCollisionShape is used for sweep tests, but doesn’t seem to support a custom convex shape, only the primitive boxes, capsules, and spheres.

I could work around this problem if I could do a sweep test with a line, but I don’t think I can do that either, only with a point.

Does anybody know how to accomplish this?

I ended up doing this myself by modifying FCollisionShape to support a PhysX convex hull object. No clue why this support isn’t already in there, you’d figure someone else would have wanted to do something like this a long time ago!

It would be great if the support for that would already be there, because I am an inexperienced programmer and I don’t know how to do that. So I will have to look for a different solution.

Can you, please, share this solution? :slight_smile:
Sadly, it’s not trivial for those of us not used to PhysX SDK :frowning:

FCollisionShape to support a PhysX convex hull, can you share the code?