Get the average velocity of the avatar.

This commit is contained in:
Geenz 2013-06-07 16:20:51 -04:00
parent 82db388552
commit 1c8d4f7717

View file

@ -823,9 +823,10 @@ void Application::idle() {
_mouseVoxel.s = 0.0f;
if (checkedVoxelModeAction() != 0 &&
_myAvatar.getVelocity().x < MAX_AVATAR_EDIT_VELOCITY &&
_myAvatar.getVelocity().y < MAX_AVATAR_EDIT_VELOCITY &&
_myAvatar.getVelocity().z < MAX_AVATAR_EDIT_VELOCITY) {
(fabs(_myAvatar.getVelocity().x) +
fabs(_myAvatar.getVelocity().y) +
fabs(_myAvatar.getVelocity().z)) / 3 < MAX_AVATAR_EDIT_VELOCITY) {
float distance;
BoxFace face;
if (_voxels.findRayIntersection(mouseRayOrigin, mouseRayDirection, _mouseVoxel, distance, face)) {