Need help with ODE and character movement

First and foremost, you should never try to build a dynamic character controller (DCC), unless you know the physics engine very well and have a very good reason (game design) for it. A DCC is a character controller that is pushed around by forces and has a dynamic body, like the one you tried to build.

A KCC (kinematic character controller), on the other hand, is a controller that is built with collision detection and custom code only, without any physics being involved.

It’s a common misconception that building a DCC is easier than build a KCC, because it looks like KCC is gonna require a lot of code, while with DCC forces, friction and the rest of the physics engine will do everything for you. This is not true. A character (like a human or animal) is not an inert body and it cannot be handled as such.

This is why, when building a DCC, you spend most of your time dealing with problems like the ones you described, which originate in trying to use the physics engine where it doesn’t apply. Thus, to regain control and simulate conscious behavior, you need to write lots and lots of code which only purpose is to prevent the physics engine from affecting your character. Which obviously defeats the purpose of using dynamics in the first place.

This is why PhysX uses a KCC.

KCC is a much better choice, but don’t expect to write one for Panda’s ODE using AutoCollide – it can’t be done for too many reasons to list.

[ODE Middleware) – this is my ODE KCC, if you wanted to take a look at how it’s done.

Most importantly, tho, it’s unreasonable to get into ODE now that Bullet is integrated. Bullet is a much better physics engine for games. It was built with games in mind, it can collide everything with everything (unlike ODE, which is very limited in this regard), it has continuous collision detection, it’s generally more robust and so on.

The only limitation of Bullet is that the character controller that comes with it is… well, not very good. That’s why I’ve ported the one I wrote for ODE to Bullet and I will be releasing it later this week.