A question about btKinematicCharacterController

Please don't post Bullet support questions here, use the above forums instead.
Nomar
Posts: 4
Joined: Fri Dec 31, 2010 10:16 am

A question about btKinematicCharacterController

Post by Nomar »

Hi there,

I'm integrating Bullet on my project (a game that uses OGRE for rendering and Bullet for physics), and everything seems to work fine, but I'm stuck on a little problem. I've decided to use the btKinematicCharacterController to move around the characters (NPC's and those controlled by human). The problem is that if I compile the game in Debug mode, the movement speed of the characters is faster than if I compile the game in Release mode. I would say that in Debug mode, a character displaces aproximately twice faster than in Release mode.

I though that may be it was an error of my application, but then I tested it on the CharacterControllerDemo and the result is the same: On Debug mode, character displaces twice faster than in Release mode. So is that a bug? And which one is the real displacement velocity, this one of Debug or Release mode? I mean, if I say that a character is moving 1.1m/s, in which mode the character is really moving at that speed?

Thanks in advance and sorry if it's a repost, but I didn't find the answer on the search. Here there is what I'm using:

IDE: Visual Studio 2005
Bullet version 2.77
Nomar
Posts: 4
Joined: Fri Dec 31, 2010 10:16 am

Re: A question about btKinematicCharacterController

Post by Nomar »

Finally, i've decided to create my own Character Controller. The issue described above seems like it's related to the physics simulation frequency, so if I put maxSubsteps = 0 when I call to stepSimulation, it works ok on Release mode too. But i can't set maxSubsteps = 0 if I want framerate independance.

Anyway, the main reason that made me decide to create my own char controller, was that the characters with btKinematicChareChontroller collides with ghostobjects, even if they have the flag CF_NO_COLLISION_RESPONSE. I tried to solve it by my own, but due to the code is completelly uncomented and I couldn't find quickly what caused the issue, I decided to create my own char controller that works as expected.