Skip to content

Using a box for a mover instead of a capsule #1032

@OrangeLightning219

Description

@OrangeLightning219

Hi.

I want to use a box shape for my character instead of a capsule but I'm having some issues with changing the mover code.
I basically copied all of the mover code and made separate versions that use b2Polygon instead of b2Capsule (b2World_CastMoverBox etc.). The issue is that when using a box my character falls through the ground.
In my b2World_CastMoverBox I removed the B2_ASSERT( mover->radius > 2.0f * B2_LINEAR_SLOP ) and tried setting canEncroach to false but it didn't help.
What would be needed to make a mover with radius 0?

My reasoning for this is that a capsule can "climb" platform corners with enough speed. Here's an example:

capsule.mp4

When I jump and dash at the right height the rounded part of the capsule climbs up to the platform.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions