Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Character controller step handling

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

  1. snacktime


    Apr 15, 2013
    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.