testing numbered joint movement

This commit is contained in:
Philip Rosedale 2014-03-20 08:54:12 -07:00
parent 774b99d868
commit 3ab0288c4f
2 changed files with 3 additions and 7 deletions

View file

@ -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;

View file

@ -11,7 +11,7 @@
#include <GeometryUtil.h>
#include <SharedUtil.h>
#include "AvatarData.h"
#include "AvatarData.h"
#include "HandData.h"