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