Hello,
may be preStep and playerStep functions are not called? Just guessing.
In actual examples it is done with PlayerStepCallback callback function.
The function has to be registered with
m_dynamicsWorld->setInternalTickCallback(PlayerStepCallback, m_character);
Alternatively you could try to put preStep and playerStep calls somewhere in
your "step physic" function directly. It works too (may be it is not a good idea, don't know,
just to test). One more thing - custom overlapping pair class is used in examples. It makes things little more difficult to start with controller (but gives good starting point for advanced things). I have tried controller simply without it - works too. Have tested on bvh mesh ground and static plane. The character is running staircases up and down very well.
strange that when i add a collision margin on the btBvhTriangleMeshShape proportion(large enough) to my character shape size, it will now slide accordingly with the walls.
Any ideas? In my screenshot, i needed to add 0.5 to the collision margin for the character to slide properly.
I think i understand your problem now - character stick to walls and (probably hangs over the ground at stepHeight). I run into the problem too... So you have helped me There is hidden code in stepForwardAndStrafe function about collision margin (near collisionWorld->convexSweepTest(), seems to help.
yeah it sticks to the walls. my level is flat so i don't encounter the problem with step up/down.
Thanks very much for the info I'll go check that portion of code out as well. Definitely its nice to modify that part instead of the entire btBvhTriangleMeshShape as all other bodies have that collision margin applied to them as well.
Do let me know if you manage to find out the correct fix for this.