mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 03:13:32 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
d65f577268
4 changed files with 25 additions and 20 deletions
|
@ -113,7 +113,7 @@ int main(int argc, const char* argv[]) {
|
|||
// move eve away from the origin
|
||||
// pick a random point inside a 10x10 grid
|
||||
|
||||
eve.setBodyPosition(glm::vec3(randFloatInRange(-RANDOM_POSITION_MAX_DIMENSION, RANDOM_POSITION_MAX_DIMENSION),
|
||||
eve.setPosition(glm::vec3(randFloatInRange(-RANDOM_POSITION_MAX_DIMENSION, RANDOM_POSITION_MAX_DIMENSION),
|
||||
0,
|
||||
randFloatInRange(-RANDOM_POSITION_MAX_DIMENSION, RANDOM_POSITION_MAX_DIMENSION)));
|
||||
|
||||
|
@ -121,9 +121,9 @@ int main(int argc, const char* argv[]) {
|
|||
eve.setBodyYaw(0);
|
||||
|
||||
// put her hand out so somebody can shake it
|
||||
eve.setHandPosition(glm::vec3(eve.getBodyPosition()[0] - 0.2,
|
||||
eve.setHandPosition(glm::vec3(eve.getPosition()[0] - 0.2,
|
||||
0.25,
|
||||
eve.getBodyPosition()[2] + 0.1));
|
||||
eve.getPosition()[2] + 0.1));
|
||||
|
||||
// read eve's audio data
|
||||
AudioInjector eveAudioInjector("eve.raw");
|
||||
|
|
|
@ -1128,24 +1128,29 @@ void Head::updateHandMovement( float deltaTime ) {
|
|||
|
||||
setHandState(_mousePressed);
|
||||
|
||||
bool atLeastOneAvatarIsGrasping = false;
|
||||
|
||||
if ( getHandState() == 1 ) { atLeastOneAvatarIsGrasping = true; }
|
||||
if ( _isMine ) {
|
||||
if ( _otherAvatar.handState == 1 ) {
|
||||
atLeastOneAvatarIsGrasping = true;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// if holding hands with another avatar, add a force to the hand...
|
||||
//---------------------------------------------------------------------
|
||||
if (( getHandState() == 1 )
|
||||
|| ( _otherAvatar.handState == 1 )) {
|
||||
//if ( _usingBodySprings )
|
||||
{
|
||||
if ( _nearOtherAvatar ) {
|
||||
|
||||
glm::vec3 vectorToOtherHand = _otherAvatar.handPosition - _handHolding.position;
|
||||
glm::vec3 vectorToMyHand = _bone[ AVATAR_BONE_RIGHT_HAND ].position - _handHolding.position;
|
||||
|
||||
_handHolding.velocity *= 0.7;
|
||||
_handHolding.velocity += ( vectorToOtherHand + vectorToMyHand ) * _handHolding.force * deltaTime;
|
||||
_handHolding.position += _handHolding.velocity;
|
||||
|
||||
_bone[ AVATAR_BONE_RIGHT_HAND ].position = _handHolding.position;
|
||||
}
|
||||
if ( atLeastOneAvatarIsGrasping ) {
|
||||
if ( _nearOtherAvatar ) {
|
||||
|
||||
glm::vec3 vectorToOtherHand = _otherAvatar.handPosition - _handHolding.position;
|
||||
glm::vec3 vectorToMyHand = _bone[ AVATAR_BONE_RIGHT_HAND ].position - _handHolding.position;
|
||||
|
||||
_handHolding.velocity *= 0.7;
|
||||
_handHolding.velocity += ( vectorToOtherHand + vectorToMyHand ) * _handHolding.force * deltaTime;
|
||||
_handHolding.position += _handHolding.velocity;
|
||||
|
||||
_bone[ AVATAR_BONE_RIGHT_HAND ].position = _handHolding.position;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -19,7 +19,7 @@ VoxelAgentData::~VoxelAgentData() {
|
|||
}
|
||||
|
||||
VoxelAgentData::VoxelAgentData(const VoxelAgentData &otherAgentData) {
|
||||
memcpy(&_bodyPosition, &otherAgentData._bodyPosition, sizeof(_bodyPosition));
|
||||
memcpy(&_Position, &otherAgentData._Position, sizeof(_Position));
|
||||
rootMarkerNode = new MarkerNode();
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ void *distributeVoxelsToListeners(void *args) {
|
|||
stopOctal = randomTree.loadBitstreamBuffer(voxelPacketEnd,
|
||||
randomTree.rootNode,
|
||||
agentData->rootMarkerNode,
|
||||
agentData->getBodyPosition(),
|
||||
agentData->getPosition(),
|
||||
treeRoot,
|
||||
viewFrustum,
|
||||
::viewFrustumCulling,
|
||||
|
|
Loading…
Reference in a new issue