mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
Merge pull request #86 from Ventrella/master
reversed left-right strafe, commented-out updateAvatarHand
This commit is contained in:
commit
987553974a
2 changed files with 16 additions and 11 deletions
|
@ -33,7 +33,7 @@ float MouthWidthChoices[3] = {0.5, 0.77, 0.3};
|
|||
float browWidth = 0.8;
|
||||
float browThickness = 0.16;
|
||||
|
||||
bool usingBigSphereCollisionTest = true;
|
||||
bool usingBigSphereCollisionTest = false;
|
||||
|
||||
const float DECAY = 0.1;
|
||||
const float THRUST_MAG = 10.0;
|
||||
|
@ -381,11 +381,11 @@ void Head::simulate(float deltaTime) {
|
|||
}
|
||||
if (_driveKeys[RIGHT]) {
|
||||
glm::vec3 right( _avatar.orientation.getRight().x, _avatar.orientation.getRight().y, _avatar.orientation.getRight().z );
|
||||
_avatar.thrust -= right * THRUST_MAG;
|
||||
_avatar.thrust += right * THRUST_MAG;
|
||||
}
|
||||
if (_driveKeys[LEFT]) {
|
||||
glm::vec3 right( _avatar.orientation.getRight().x, _avatar.orientation.getRight().y, _avatar.orientation.getRight().z );
|
||||
_avatar.thrust += right * THRUST_MAG;
|
||||
_avatar.thrust -= right * THRUST_MAG;
|
||||
}
|
||||
if (_driveKeys[UP]) {
|
||||
glm::vec3 up( _avatar.orientation.getUp().x, _avatar.orientation.getUp().y, _avatar.orientation.getUp().z );
|
||||
|
|
|
@ -363,6 +363,7 @@ void reset_sensors()
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void updateAvatarHand(float deltaTime) {
|
||||
// If mouse is being dragged, send current force to the hand controller
|
||||
if (mousePressed == 1)
|
||||
|
@ -376,6 +377,7 @@ void updateAvatarHand(float deltaTime) {
|
|||
//myAvatar.hand->addVelocity(vel*deltaTime);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
// Using gyro data, update both view frustum and avatar head position
|
||||
|
@ -1355,30 +1357,33 @@ void idle(void) {
|
|||
else {
|
||||
myAvatar.setTriggeringAction( false );
|
||||
}
|
||||
|
||||
float deltaTime = 1.f/FPS;
|
||||
|
||||
//
|
||||
// Sample hardware, update view frustum if needed, Lsend avatar data to mixer/agents
|
||||
//
|
||||
updateAvatar( 1.f/FPS );
|
||||
|
||||
|
||||
//loop through all the other avatars and simulate them.
|
||||
AgentList * agentList = AgentList::getInstance();
|
||||
for(std::vector<Agent>::iterator agent = agentList->getAgents().begin(); agent != agentList->getAgents().end(); agent++)
|
||||
{
|
||||
if (agent->getLinkedData() != NULL)
|
||||
{
|
||||
Head *agentHead = (Head *)agent->getLinkedData();
|
||||
agentHead->simulate(1.f/FPS);
|
||||
Head *avatar = (Head *)agent->getLinkedData();
|
||||
avatar->simulate(deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
updateAvatarHand(1.f/FPS);
|
||||
//updateAvatarHand(1.f/FPS);
|
||||
|
||||
field.simulate(1.f/FPS);
|
||||
myAvatar.simulate(1.f/FPS);
|
||||
balls.simulate(1.f/FPS);
|
||||
cloud.simulate(1.f/FPS);
|
||||
field.simulate (deltaTime);
|
||||
myAvatar.simulate(deltaTime);
|
||||
balls.simulate (deltaTime);
|
||||
cloud.simulate (deltaTime);
|
||||
|
||||
glutPostRedisplay();
|
||||
lastTimeIdle = check;
|
||||
|
|
Loading…
Reference in a new issue