|
From: julien r. <jul...@us...> - 2004-10-31 11:40:00
|
Update of /cvsroot/epfl/tgengine-0.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20369 Modified Files: physicengine.cc Log Message: ^^ Index: physicengine.cc =================================================================== RCS file: /cvsroot/epfl/tgengine-0.1/physicengine.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** physicengine.cc 28 Oct 2004 21:10:16 -0000 1.14 --- physicengine.cc 31 Oct 2004 11:39:49 -0000 1.15 *************** *** 97,101 **** n->SetPosition(n->GetPosition()+n->GetVelocity()*eTime); //n->SetRotation(n->GetRotation()+n->GetRotationVelocity()*eTime); ! n->SetRotation(n->GetRotation()*n->GetRotationVelocity()*eTime); n->UpdatePosition(); --- 97,104 ---- n->SetPosition(n->GetPosition()+n->GetVelocity()*eTime); //n->SetRotation(n->GetRotation()+n->GetRotationVelocity()*eTime); ! Quaternion q = n->GetRotationVelocity()*eTime; ! q.Normalize(); ! n->SetRotation(n->GetRotation()*q); ! n->UpdatePosition(); |