mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
Fixed bug having other people showing up at negative of their transmitted position.
This commit is contained in:
parent
952cb2f2ae
commit
6b03622e29
2 changed files with 7 additions and 2 deletions
|
@ -825,7 +825,7 @@ void display(void)
|
|||
Head *agentHead = (Head *)agent->getLinkedData();
|
||||
glPushMatrix();
|
||||
glm::vec3 pos = agentHead->getBodyPosition();
|
||||
glTranslatef(-pos.x, -pos.y, -pos.z);
|
||||
glTranslatef(pos.x, pos.y, pos.z);
|
||||
agentHead->render(0);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
|
|
@ -59,10 +59,12 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
|
|||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _bodyPitch);
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _bodyRoll);
|
||||
|
||||
//printf( "_bodyYaw = %f", _bodyYaw );
|
||||
|
||||
memcpy(destinationBuffer, &_handPosition, sizeof(float) * 3);
|
||||
destinationBuffer += sizeof(float) * 3;
|
||||
|
||||
//std::cout << _handPosition.x << ", " << _handPosition.y << ", " << _handPosition.z << "\n";
|
||||
//std::cout << _bodyPosition.x << ", " << _bodyPosition.y << ", " << _bodyPosition.z << "\n";
|
||||
|
||||
return destinationBuffer - bufferStart;
|
||||
}
|
||||
|
@ -83,6 +85,9 @@ void AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
memcpy(&_handPosition, sourceBuffer, sizeof(float) * 3);
|
||||
sourceBuffer += sizeof(float) * 3;
|
||||
|
||||
//std::cout << _bodyPosition.x << ", " << _bodyPosition.y << ", " << _bodyPosition.z << "\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
glm::vec3 AvatarData::getBodyPosition() {
|
||||
|
|
Loading…
Reference in a new issue