teh player does set the player matrix to the direction in which he or her is heading.
I am surprised because I am on the camp that prefer the player capsules not to rotate, but there it is the player capsule does rotate. I guess is was fixed at some point and I forget.
look at file ..\sdk\dVehicle\dPlayerController\dPlayerController.cpp
function void dPlayerController::PreUpdate(dFloat timestep)
about line 509 or so you will see this code
- Code: Select all
// set player orientation
dMatrix matrix(dYawMatrix(GetHeadingAngle()));
NewtonBodyGetPosition(m_newtonBody, &matrix.m_posit[0]);
NewtonBodySetMatrix(m_newtonBody, &matrix[0][0]);
set the matrix of the player capsule is set to the heading direction.
if you add this line
dTrace(("%f (%f %f) ", GetHeadingAngle() * dRadToDegree, matrix[0][0], matrix[0][2]));
you can see thet the matrix is set to the player heading every tick, so unless I misunderstood the problem, this should be working.