Hi There
Yes some of your problems sound familiar to me. However it's hard for me to give you answers from such a vage description of how you've setup your scene.
So right now I'll post a code example of my character move function and give you a little description of how my scene is setup.
First up I'll address the move function and your characters lack of falling. The reason your character isn't being effected by gravity is that the physx character controller will not do that for you instead you must manually put gravity into your movement calculations. heres the code I use for my character.
Code: Select all
void CEntityCharacter::Move(vector3df dir, float fvel)
{
m_graphics->getAbsoluteTransformation().rotateVect(dir);
dir.normalize();
dir *= fvel;
SPhysxCharacterControllerFlags moveflags;
//add on gravity to the dir
dir.Y += GRAVITY;
m_physics->move(dir,~0,moveflags);
m_movedthisframe = true;
if (moveflags.bottom)
{
m_onground = true;
}
else
{
m_onground = false;
}
}
btw m_onground is a special bool value which lets me keep track of if the character is standing on sometihng or is in mid air. I call this function everytime I need to do an actual move or if the character is in mid air to apply gravity. The params dir and fvel are for the direction of the move and the distance to move by. Also note m_graphics is an Irrlicht scene node it's used to generate a normalised vector to pass to the m_physics (the character controller) move method.
That should now mean that your character will fall. As for the problems your having with your camera I'm unsure whats your using to control your camera, for instance is it also a irrphysx character controller or is it just a regular irrphyx physxobject? I've also had problems with terrain collisions and I've been having them with the regular irrphysx it's something to do with the way irrphyx works with terrain nodes. It seems if you scale them too much it will mess up.
Now heres a little description of what I have in the scene you can see from the screen shot. Firstly the character is standing on a large flat box that is a static irrphysx object (it has a mass of 0) . The other visble box is a regular irrphysx object and the character is being controlled by my irrphysx character controller. My camera is not controlled by irrphysx it's manually controlled by my mouse and keyboard.
Hope that helps.