mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +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))
|
||||
}
|
||||
var intersection = Entities.findRayIntersection(pickRay, true, [], [_this.entityID, _this.lighterParticleEntity]);
|
||||
if (intersection.intersects && intersection.distance <= FLAME_LENGTH && intersection.properties.script !== '') {
|
||||
Entities.callEntityMethod(intersection.properties.id, 'onLit', [_this.triggerValue]);
|
||||
debugPrint('Light it up! found: ' + intersection.properties.id);
|
||||
if (intersection.intersects && intersection.distance <= FLAME_LENGTH) {
|
||||
var properties = Entities.getEntityProperties(intersection.entityID, 'script');
|
||||
if (properties.script !== '') {
|
||||
Entities.callEntityMethod(intersection.entityID, 'onLit', [_this.triggerValue]);
|
||||
debugPrint('Light it up! found: ' + intersection.entityID);
|
||||
}
|
||||
}
|
||||
},
|
||||
releaseEquip: function(entityID, args) {
|
||||
|
|
Loading…
Reference in a new issue