Types of Character Controllers?

Started by
4 comments, last by Steve_Segreto 11 years, 5 months ago
So I've made a ton of attempts at creating my ideal character controller, and I've got something at least functional. But it's messy and feels rather heavy-handed in many cases. But rather than go into detail about all my trial and error, I'd like to learn as a blank slate about what other people do.

What types of character controllers are out there? What shape are they, and how many raycasts do they rely upon? How flexible are they and what pitfalls do they have?
Are there some good rigidbody designs, or do most require manual interaction with physics?

Is the standard capsule collider a poor choice, or is it workable? UDK's looks interesting but I haven't figured out how to start analyzing it yet.


Your input would be most appreciated.


ADDENDUM: I suppose what I'm most lost on is how to best determine what the normal of the ground is a character is standing on. There can be many influences, but how to know what to choose?
Advertisement
Check out the PhysX character controller, I think its one of the cooler ones :)

Many other physics engines also have kinematic character controllers, which are just user-defined shapes that move programmatically rather than according to the laws of physics.

When I was messing with one, I used two raycasts to avoid some corner cases where the physics system would jitter uncontrollably. I would ray cast from the top and center of the kinematic bounding volume.

There is also the possibility of using a rigidbody for a character, but i've heard it takes some tweaking to get it right.
I have been using a rigidbody with capsule collider to relative success, but to know what ground a character is standing on, I've had to rely on keeping statistics on every surface the character is colliding with, then I'd create a composite normal out of all ground-angled normals.

It works relatively well, but it feels heavy and messy, and still has its own pitfalls. Yet I see other games which seem much more simplistic when I play with them, and I want to achieve similar levels of elegance.
Following this topic.

I have been experimenting with my character controller for a while and I'm still very unsatisfied. I have many issues.

  1. It needs to fall down coherently with standard dynamic objects. (done)
  2. It must have a much more fine-grained, script-controlled degree of collision filters (done)
  3. It must behave accordingly to game-specific state. (done)
  4. It must "not get stuck" (almost there).

For the time being, I'm using full sweeps for arbitrary convex shapes. Raycasting does not appear sufficiently robust for my generic controller. I still wonder how a capsule controller can be a generally good solution.
Character controllers as in Bullet does not appear much of a use to me. Don't get me wrong, they're still better than nothing. I keep reading about the PhysX controller, I should probably have to look at it soon.

In the meanwhile, if we can mash up something here, I'd be glad to all of you.

Previously "Krohm"

Nemox do you use a mesh for the physics and another for the render?
If your character controller is getting stuck in acute corners or other geometry above the (x,z) plane, you can use a few simple raycasts (from the hip and head of the controller). These extra raycasts supersede entering the swept sphere (ellipsoid) collision detection/response algorithm and can also prevent jittering.

This topic is closed to new replies.

Advertisement