I tried to use a cylinder for my bounding box. My problem unfortunately appears right before I can check any collisions.
My camera stands right outside the cylinder and views it. I now use the rotation transformation (only for horizontally) and moving length that I also use for the camera. I can see the cylinder rotation like the camera does and it moves the same amount camera does. Only problem is - the rotation does not have any affect on the direction of moving forward or backward.
This is the code for rotating the mesh:
#############################################
if(playerCollGeom){
rot = csXRotMatrix3(0.0f) * csYRotMatrix3(rotY);
csOrthoTransform ct(rot, playerCollGeom->GetMovable()->GetPosition());
playerCollGeom->GetMovable()->SetTransform(ct);
playerCollGeom->GetMovable()->UpdateMove();
}
############################################
...where playerCollGeom is an iMeshWrapper for the bounding box.
I tried to search out in the walktest, but did not get another way to rotate the mesh.
Can anyone give me a hint?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to use a cylinder for my bounding box. My problem unfortunately appears right before I can check any collisions.
My camera stands right outside the cylinder and views it. I now use the rotation transformation (only for horizontally) and moving length that I also use for the camera. I can see the cylinder rotation like the camera does and it moves the same amount camera does. Only problem is - the rotation does not have any affect on the direction of moving forward or backward.
This is the code for rotating the mesh:
#############################################
if(playerCollGeom){
rot = csXRotMatrix3(0.0f) * csYRotMatrix3(rotY);
csOrthoTransform ct(rot, playerCollGeom->GetMovable()->GetPosition());
playerCollGeom->GetMovable()->SetTransform(ct);
playerCollGeom->GetMovable()->UpdateMove();
}
############################################
...where playerCollGeom is an iMeshWrapper for the bounding box.
I tried to search out in the walktest, but did not get another way to rotate the mesh.
Can anyone give me a hint?
Thanks!