Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Character controller step handling

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

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,330
    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.
     
unityunity