Update of /cvsroot/epfl/tggame
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28541
Modified Files:
aicontroller.cc game.cc playercontroller.cc
Log Message:
fixe dans les collisions
Index: game.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/game.cc,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** game.cc 9 Nov 2004 18:19:03 -0000 1.28
--- game.cc 10 Nov 2004 21:02:19 -0000 1.29
***************
*** 115,121 ****
pModel->SetAnimation("idle");
pModel->bCamera = true;
! Quaternion q(-90, Vector3(1,0,0));
! q *= Quaternion(90, Vector3(0,1,0));
! pModel->SetRotation(q);
pModel->SetPosition(Vector3(5,0,-5));
pSceneManager->AddWorldObject(pModel);
--- 115,119 ----
pModel->SetAnimation("idle");
pModel->bCamera = true;
! pModel->SetRotation(Quaternion(90, Vector3(0,0,1)));
pModel->SetPosition(Vector3(5,0,-5));
pSceneManager->AddWorldObject(pModel);
***************
*** 129,133 ****
vControllers.push_back(pLocalController);
cam->SetViewOffset(Vector3(0,70,0));
! pLocalController->SetViewOffset(Vector3(0,70,0));
//p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(20,80,20));
--- 127,131 ----
vControllers.push_back(pLocalController);
cam->SetViewOffset(Vector3(0,70,0));
! pLocalController->SetViewOffset(Vector3(0,60,0));
//p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(20,80,20));
***************
*** 146,150 ****
p->SetMoveSpeed(CAM_SPEED);
p->SetVelocity(Vector3(0,0,0));
! p->SetRotation(Quaternion(-90, Vector3(1,0,0)));
p->SetPosition(Vector3(0,70,0));
c->SetViewOffset(Vector3(0,70,0));
--- 144,148 ----
p->SetMoveSpeed(CAM_SPEED);
p->SetVelocity(Vector3(0,0,0));
! //p->SetRotation(Quaternion(-90, Vector3(1,0,0)));
p->SetPosition(Vector3(0,70,0));
c->SetViewOffset(Vector3(0,70,0));
Index: playercontroller.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/playercontroller.cc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** playercontroller.cc 9 Nov 2004 18:19:03 -0000 1.12
--- playercontroller.cc 10 Nov 2004 21:02:19 -0000 1.13
***************
*** 70,74 ****
void PlayerController::Collide (SceneNode* other, const Vector3& vPoint, const Vector3& vCollisionNormal)
{
! std::cerr << "playercontroller" << std::endl;
}
--- 70,74 ----
void PlayerController::Collide (SceneNode* other, const Vector3& vPoint, const Vector3& vCollisionNormal)
{
! //std::cerr << "playercontroller" << std::endl;
}
Index: aicontroller.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/aicontroller.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** aicontroller.cc 9 Nov 2004 18:19:02 -0000 1.8
--- aicontroller.cc 10 Nov 2004 21:02:17 -0000 1.9
***************
*** 19,22 ****
--- 19,23 ----
{
pSphere = new DebugSphere ();
+ Game::pSelf->GetSceneManager()->AddDebugSphere(pSphere);
}
***************
*** 31,35 ****
CollisionResult cR = Game::pSelf->Trace(vPosition, vTarget, pPawn);
pSphere->vPosition = cR.EndPoint;
! std::cout << cR.EndPoint << std::endl;
if (cR.pNode != NULL && cR.pNode->GetPhysicCallBack() != NULL)
--- 32,36 ----
CollisionResult cR = Game::pSelf->Trace(vPosition, vTarget, pPawn);
pSphere->vPosition = cR.EndPoint;
! //std::cout << cR.EndPoint << std::endl;
if (cR.pNode != NULL && cR.pNode->GetPhysicCallBack() != NULL)
|