mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 03:55:08 +02:00
added AVATAR_FACING_THRESHOLD to avatarTouch
This commit is contained in:
parent
82683dbabc
commit
e4c0aeb9a0
2 changed files with 4 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
const float THREAD_RADIUS = 0.007;
|
||||
const float HANDS_CLOSE_ENOUGH_TO_GRASP = 0.2;
|
||||
const float AVATAR_FACING_THRESHOLD = 0.1f; // (-1 to 1) (larger value indicates narrower angle of influence
|
||||
|
||||
AvatarTouch::AvatarTouch() {
|
||||
|
||||
|
@ -43,8 +44,8 @@ void AvatarTouch::simulate (float deltaTime) {
|
|||
|
||||
bool facingEachOther = false;
|
||||
|
||||
if (( glm::dot(_myOrientation.getFront(), _yourOrientation.getFront()) < -0.1f)
|
||||
&& ( glm::dot(_myOrientation.getFront(), directionBetweenBodies ) > 0.1f)) {
|
||||
if (( glm::dot(_myOrientation.getFront(), _yourOrientation.getFront()) < -AVATAR_FACING_THRESHOLD)
|
||||
&& ( glm::dot(_myOrientation.getFront(), directionBetweenBodies ) > AVATAR_FACING_THRESHOLD)) {
|
||||
facingEachOther = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue