Character version 2.0

I have spent the last 2 weeks working on a new character controller for HPL2 and finally the bulk of the code is complete.

The reason for making a new character controller is that the one in the old engine (which is used in Penumbra) is very bad at interacting with other physical bodies. I used a quite different approach for the new character controller and have made it a lot better at handling interactions.

At the end of this post is a video of the character controller in action. Some high lights are:

  • The character can interact both ways with physical object, ie both get and be pushed. The best example of this is the seesaw where the character can both push it down and, if enough weight is applied on the other side, get pushed up. This is something that no other games do, except for games that uses non-exact physical objects as “characters” (for example: Marble Madness clones, car games, etc).
  • The controller can walk up slopes with out sliding down and will “stick” to them when walk down.
  • The character can climb stairs and the speed at which a stair is climbed is settable (notice how the character is on ground during climbing in upper left corner).
  • When standing on objects the player will slide along even if they rotate. Also notice the support for inertial frames, when the character jumps straight up while riding the box, the character stays put according to the position of the box (except for a tiny bit caused by wind resistance).
  • The character can get attached to physical bodies which makes a good base for grabbing onto ledges, swinging in ropes, etc.