Search Unity

Character controller step handling

Discussion in 'Physics for ECS' started by snacktime, Jul 2, 2020.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Curious what others have come up with for this.

    I'm fairly new to working with physics generally and this is what I've come up with so far, not yet implemented.

    Basic approach is find all planes along the linear velocity that match the following criteria:

    - Not the current supporting plane.

    - Is walkable and within a min/max height. Min being what the solver won't automatically handle max being the max step height.

    Once you have your target step planes create constraint planes that go from current supported position to the top of the step. There might be multiple of these very close together which seems like it should be fine.

    constraint plane starting point needs to be some minimum distance away so the solver will always move the capsule along the constraint. It should be the case that as long as you are within some min/max range then you can build a constraint to the target hit point and it should work.


    This is an entirely new problem for me hence posting it here before diving into the implementation.