Showing the changes to scripts/tutorials/entity_scripts (1 of 1 file). Show all
Unified · Split
| @@ -99,7 +99,6 @@ · 98 unmodified lines | ||
| 99 | 99 | var howFar = howFarAway(props.position); |
| 100 | 100 | if ((state === STANDING) && (howFar < sitDistance) && isSeatOpen(props.position, sitDistance)) { |
| 101 | 101 | moveToSeat(props.position, props.rotation); |
| 102 | − //MyAvatar.characterControllerEnabled = true; | |
| 103 | 102 | enterSitPose(); |
| 104 | 103 | state = SITTING; |
| 105 | 104 | debugPrint("Sitting from being close"); |
| @@ -117,7 +116,6 @@ · 11 unmodified lines | ||
| 117 | 116 | props = Entities.getEntityProperties(entity, [ "position", "rotation" ]); |
| 118 | 117 | if ((state === STANDING) && isSeatOpen(props.position, sitDistance)) { |
| 119 | 118 | moveToSeat(props.position, props.rotation); |
| 120 | − //MyAvatar.characterControllerEnabled = false; | |
| 121 | 119 | enterSitPose(); |
| 122 | 120 | state = SITTING; |
| 123 | 121 | debugPrint("Sitting from mouse click"); |
| @@ -125,11 +123,12 @@ · 1 unmodified line | ||
| 125 | 123 | } |
| 126 | 124 | |
| 127 | 125 | this.startFarTrigger = function() { |
| 126 | + if ((state === STANDING) && isSeatOpen(props.position, sitDistance)) { | |
| 128 | 127 | moveToSeat(props.position, props.rotation); |
| 129 | − //MyAvatar.characterControllerEnabled = false; | |
| 130 | 128 | enterSitPose(); |
| 131 | 129 | state = SITTING; |
| 132 | 130 | debugPrint("Sitting from far trigger"); |
| 131 | + } | |
| 133 | 132 | } |
| 134 | 133 | |
| 135 | 134 | this.checkSettings = function() { |