mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:50:43 +02:00
spacing fixes in Avatar class
This commit is contained in:
parent
507f39a052
commit
7e0dab6224
2 changed files with 107 additions and 118 deletions
|
@ -358,29 +358,22 @@ void Avatar::simulate(float deltaTime) {
|
|||
}
|
||||
|
||||
if (usingBigSphereCollisionTest) {
|
||||
|
||||
// test for avatar collision response (using a big sphere :)
|
||||
updateAvatarCollisionDetectionAndResponse
|
||||
(
|
||||
_TEST_bigSpherePosition,
|
||||
updateAvatarCollisionDetectionAndResponse(_TEST_bigSpherePosition,
|
||||
_TEST_bigSphereRadius,
|
||||
_TEST_bigSphereRadius,
|
||||
glm::vec3( 0.0, 1.0, 0.0 ),
|
||||
deltaTime
|
||||
);
|
||||
deltaTime);
|
||||
}
|
||||
|
||||
if ( AVATAR_GRAVITY ) {
|
||||
if ( _position.y > _bone[ AVATAR_BONE_RIGHT_FOOT ].radius * 2.0 ) {
|
||||
_velocity += glm::dvec3( 0.0, -1.0, 0.0 ) * ( 6.0 * deltaTime );
|
||||
}
|
||||
else {
|
||||
if ( _position.y < _bone[ AVATAR_BONE_RIGHT_FOOT ].radius ) {
|
||||
} else if ( _position.y < _bone[ AVATAR_BONE_RIGHT_FOOT ].radius ) {
|
||||
_position.y = _bone[ AVATAR_BONE_RIGHT_FOOT ].radius;
|
||||
_velocity.y = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update body springs
|
||||
updateBodySprings( deltaTime );
|
||||
|
|
|
@ -247,7 +247,6 @@ class Avatar : public AvatarData {
|
|||
Avatar* _interactingOther;
|
||||
bool _interactingOtherIsNearby;
|
||||
|
||||
// private methods...
|
||||
void initializeSkeleton();
|
||||
void updateSkeleton();
|
||||
void initializeBodySprings();
|
||||
|
@ -255,14 +254,11 @@ class Avatar : public AvatarData {
|
|||
void calculateBoneLengths();
|
||||
void readSensors();
|
||||
void renderBoneAsBlock( AvatarBoneID b );
|
||||
void updateAvatarCollisionDetectionAndResponse
|
||||
(
|
||||
glm::vec3 collisionPosition,
|
||||
void updateAvatarCollisionDetectionAndResponse(glm::vec3 collisionPosition,
|
||||
float collisionGirth,
|
||||
float collisionHeight,
|
||||
glm::vec3 collisionUpVector,
|
||||
float deltaTime
|
||||
);
|
||||
float deltaTime);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue