mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 04:49:45 +02:00
Partial commit with head render angle fixes
This commit is contained in:
parent
50f1ba8c2d
commit
514a373acd
2 changed files with 9 additions and 5 deletions
|
@ -223,10 +223,9 @@ void Head::render(int faceToFace, float * myLocation)
|
|||
glScalef(scale, scale, scale);
|
||||
glTranslatef(leanSideways, 0.f, leanForward);
|
||||
|
||||
glRotatef(Yaw/2.0, 0, 1, 0);
|
||||
glRotatef(Pitch/2.0, 1, 0, 0);
|
||||
glRotatef(Roll/2.0, 0, 0, 1);
|
||||
|
||||
glRotatef(Yaw, 0, 1, 0);
|
||||
glRotatef(Pitch, 1, 0, 0);
|
||||
glRotatef(Roll, 0, 0, 1);
|
||||
|
||||
// Overall scale of head
|
||||
if (faceToFace) glScalef(1.5, 2.0, 2.0);
|
||||
|
@ -334,7 +333,7 @@ void Head::render(int faceToFace, float * myLocation)
|
|||
int Head::getBroadcastData(char* data)
|
||||
{
|
||||
// Copy data for transmission to the buffer, return length of data
|
||||
sprintf(data, "H%f,%f,%f,%f,%f,%f,%f,%f", Pitch + getRenderPitch(), Yaw + getRenderYaw(), Roll,
|
||||
sprintf(data, "H%f,%f,%f,%f,%f,%f,%f,%f", getRenderPitch() + Pitch, -getRenderYaw() + 180 -Yaw, Roll,
|
||||
position.x, position.y, position.z,
|
||||
loudness, averageLoudness);
|
||||
//printf("x: %3.1f\n", position.x);
|
||||
|
|
|
@ -282,7 +282,12 @@ void display_stats(void)
|
|||
pingTimes << " " << getAgentAddress(i) << ": " << getAgentPing(i);
|
||||
}
|
||||
drawtext(10,50,0.10, 0, 1.0, 0, (char *)pingTimes.str().c_str());
|
||||
|
||||
|
||||
std::stringstream angles;
|
||||
angles << "render_yaw: " << myHead.getRenderYaw() << ", Yaw: " << myHead.getYaw();
|
||||
drawtext(10,50,0.10, 0, 1.0, 0, (char *)angles.str().c_str());
|
||||
|
||||
/*
|
||||
char adc[200];
|
||||
sprintf(adc, "location = %3.1f,%3.1f,%3.1f, angle_to(origin) = %3.1f, head yaw = %3.1f, render_yaw = %3.1f",
|
||||
|
|
Loading…
Reference in a new issue