Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Character Controller development

Posted by , 30 December 2012 · 720 views

Character Controller development I wrote a miniature level editor and have got the basics of a capsule-based character controller working now. It correctly collides with the various objects as you move it around, including sliding and resolving the awkward cases where resolving a collision with one shape causes a collision with another.

To address this, I do the collision detection and resolution in a loop that is capped at a maximum number of iterations but otherwise continues while the length of the collision resolution vector last returned is greater than a certain threshold. So it keeps resolving until the object is not colliding with anything. A cap of 10 is sufficient to resolve the case here, where the capsule attempts to move into the slope from underneath.

This is the majority of it solved now. Just need to deal with gravity and standing on/walking up slopes now. At the moment, the object moves very slowly up slopes and slides back down if a naive gravity is applied. Need to figure a way to do this better, then the basics of character controller stuff is done.

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

January 2017 »

1516 17 18192021

Recent Entries

Recent Comments

Recent Entries

Recent Comments