From 3ab0288c4f133a9841452540e4240f1ff1803d9b Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Thu, 20 Mar 2014 08:54:12 -0700 Subject: [PATCH] testing numbered joint movement --- examples/bot.js | 8 ++------ libraries/avatars/src/HandData.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/bot.js b/examples/bot.js index 201a629a92..f2cc3e23a1 100644 --- a/examples/bot.js +++ b/examples/bot.js @@ -26,7 +26,7 @@ var CHANCE_OF_MOVING = 0.005; var CHANCE_OF_SOUND = 0.005; var CHANCE_OF_HEAD_TURNING = 0.05; var CHANCE_OF_BIG_MOVE = 0.1; -var CHANCE_OF_WAVING = 0.000; // Currently this isn't working +var CHANCE_OF_WAVING = 0.005; // Currently this isn't working var shouldReceiveVoxels = true; var VOXEL_FPS = 60.0; @@ -141,17 +141,13 @@ function updateBehavior(deltaTime) { waveAmplitude = 5.0 + Math.random() * 60.0; Script.setTimeout(stopWaving, 1000 + Math.random() * 2000); } else if (isWaving) { - Avatar.setJointData("joint_L_shoulder", Quat.fromPitchYawRollDegrees(0.0, 0.0, waveAmplitude * Math.sin(cumulativeTime * waveFrequency))); + Avatar.setJointData(15, Quat.fromPitchYawRollDegrees(0.0, 0.0, waveAmplitude * Math.sin(cumulativeTime * waveFrequency))); } if (Math.random() < CHANCE_OF_SOUND) { playRandomSound(); } - if (Agent.isPlayingAvatarSound) { - Avatar.handPosition = Vec3.sum(Avatar.position, Quat.getFront(Avatar.orientation)); - } - if (!isTurningHead && (Math.random() < CHANCE_OF_HEAD_TURNING)) { targetHeadPitch = getRandomFloat(-PITCH_RANGE, PITCH_RANGE); isTurningHead = true; diff --git a/libraries/avatars/src/HandData.cpp b/libraries/avatars/src/HandData.cpp index e983c0e705..78ebf4b921 100644 --- a/libraries/avatars/src/HandData.cpp +++ b/libraries/avatars/src/HandData.cpp @@ -11,7 +11,7 @@ #include #include -#include "AvatarData.h" +#include "AvatarData.h" #include "HandData.h"