History

wrap far trigger too with seated check

Philip Rosedale committed 9 years ago

Commit a689d521 parent 0ad9a861 file · +2 −3Browse files

Showing the changes to scripts/tutorials/entity_scripts (1 of 1 file). Show all

Unified · Split

scripts/tutorials/entity_scripts/chair.js+2−3
@@ -99,7 +99,6 @@ · 98 unmodified lines
9999 var howFar = howFarAway(props.position);
100100 if ((state === STANDING) && (howFar < sitDistance) && isSeatOpen(props.position, sitDistance)) {
101101 moveToSeat(props.position, props.rotation);
102− //MyAvatar.characterControllerEnabled = true;
103102 enterSitPose();
104103 state = SITTING;
105104 debugPrint("Sitting from being close");
@@ -117,7 +116,6 @@ · 11 unmodified lines
117116 props = Entities.getEntityProperties(entity, [ "position", "rotation" ]);
118117 if ((state === STANDING) && isSeatOpen(props.position, sitDistance)) {
119118 moveToSeat(props.position, props.rotation);
120− //MyAvatar.characterControllerEnabled = false;
121119 enterSitPose();
122120 state = SITTING;
123121 debugPrint("Sitting from mouse click");
@@ -125,11 +123,12 @@ · 1 unmodified line
125123 }
126124
127125 this.startFarTrigger = function() {
126+ if ((state === STANDING) && isSeatOpen(props.position, sitDistance)) {
128127 moveToSeat(props.position, props.rotation);
129− //MyAvatar.characterControllerEnabled = false;
130128 enterSitPose();
131129 state = SITTING;
132130 debugPrint("Sitting from far trigger");
131+ }
133132 }
134133
135134 this.checkSettings = function() {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t