From 8daae1dd1d05c0a30d754011aa96e3fa412d40cd Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 7 May 2013 15:11:01 -0700 Subject: [PATCH] bring eve closer to the ground after scale changes --- eve/src/main.cpp | 4 +++- libraries/avatars/src/AvatarData.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eve/src/main.cpp b/eve/src/main.cpp index cb774d70a7..fd66d6911c 100644 --- a/eve/src/main.cpp +++ b/eve/src/main.cpp @@ -29,6 +29,8 @@ const int ITERATIONS_BEFORE_HAND_GRAB = 100; const int HAND_GRAB_DURATION_ITERATIONS = 50; const int HAND_TIMER_SLEEP_ITERATIONS = 50; +const float EVE_PELVIS_HEIGHT = 0.5f; + bool stopReceiveAgentDataThread; bool injectAudioThreadRunning = false; @@ -118,7 +120,7 @@ int main(int argc, const char* argv[]) { // pick a random point inside a 10x10 grid eve.setPosition(glm::vec3(randFloatInRange(0, RANDOM_POSITION_MAX_DIMENSION), - 1.33, // this should be the same as the avatar's pelvis standing height + EVE_PELVIS_HEIGHT, // this should be the same as the avatar's pelvis standing height randFloatInRange(0, RANDOM_POSITION_MAX_DIMENSION))); // face any instance of eve down the z-axis diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index e1af4da4a2..3b8e06e81e 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -139,7 +139,7 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) { // Body world position memcpy(&_position, sourceBuffer, sizeof(float) * 3); sourceBuffer += sizeof(float) * 3; - + // Body rotation (NOTE: This needs to become a quaternion to save two bytes) sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &_bodyYaw); sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &_bodyPitch);