Character Controller Implementation

Started by
0 comments, last by MrRowl 12 years, 3 months ago
Hi everyone,

I am working on a small enigma game in 3D. At the moment, the game engine is almost done, including the physics engine (I'm doing everything myself from scratch, I just use lwjgl for the input/sound/display).

I have writen an impulse based physics engine (cf Erin Catto's tutorial), everything works well, but I'm strugling with the integration of the player controller in the physics engine.

So far, I've read several articles on this blog:http://www.digitalrune.com/Support/Blog/tabid/719/tagid/12/Character-Controller.asp.
I've also checked this forum, especially this thread: http://www.gamedev.net/topic/599382-advice-about-character-controller-implementation/page__p__4796013__hl__character%20controller__fromsearch__1#entry4796013
Thanks to the participants of the thread btw it has been very informative.

I'm wondering if I should include my character controller as a rigid body, or as a fixed body, or as a ghost in my simulation.

Since the interaction between the player and the physics bodies in the game is a crucial part of the game, it seems to me that the first sollution is the best, but I'd like to know if someone managed an approach which worked.

Thanks,

Mytrill.
Advertisement
It probably doesn't matter which option you go for - in both cases you'll get things "for free", and in both cases you'll have very tricky problems to solve. However, I've seen both types character controllers implemented very well - including kinematic controllers that have very good interaction with dynamic objects - pushing them around and standing on them.

It might be that you have special requirements though. For example, you might need to update your character controller before the physics update so that you can use its new position to set your dynamics inputs (in which case use a kinematic controller). Or you might find that a dynamic controller can be implemented more efficiently because of collision detection considerations.

This topic is closed to new replies.

Advertisement