mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
Merge pull request #10093 from huffman/fix/tutorial-lighter-intersection
Fix the tutorial lighter using properties inside intersection results
This commit is contained in:
commit
29b966ee04
1 changed files with 6 additions and 3 deletions
|
@ -154,9 +154,12 @@
|
||||||
direction: Quat.inverse(Quat.getFront(flameProperties.rotation))
|
direction: Quat.inverse(Quat.getFront(flameProperties.rotation))
|
||||||
}
|
}
|
||||||
var intersection = Entities.findRayIntersection(pickRay, true, [], [_this.entityID, _this.lighterParticleEntity]);
|
var intersection = Entities.findRayIntersection(pickRay, true, [], [_this.entityID, _this.lighterParticleEntity]);
|
||||||
if (intersection.intersects && intersection.distance <= FLAME_LENGTH && intersection.properties.script !== '') {
|
if (intersection.intersects && intersection.distance <= FLAME_LENGTH) {
|
||||||
Entities.callEntityMethod(intersection.properties.id, 'onLit', [_this.triggerValue]);
|
var properties = Entities.getEntityProperties(intersection.entityID, 'script');
|
||||||
debugPrint('Light it up! found: ' + intersection.properties.id);
|
if (properties.script !== '') {
|
||||||
|
Entities.callEntityMethod(intersection.entityID, 'onLit', [_this.triggerValue]);
|
||||||
|
debugPrint('Light it up! found: ' + intersection.entityID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
releaseEquip: function(entityID, args) {
|
releaseEquip: function(entityID, args) {
|
||||||
|
|
Loading…
Reference in a new issue