Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!






Character Controller development

Posted by Aardvajk, 30 December 2012 · 523 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.




November 2014 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
2324 25 26272829
30      

Recent Entries

Recent Comments

Recent Entries

Recent Comments

PARTNERS