This commit is contained in:
ericrius1 2016-02-17 17:30:01 -08:00
parent 7f23ee04be
commit 728e8c763d

View file

@ -21,12 +21,25 @@
MarkerTip.prototype = {
continueNearGrab: function() {
print("EBL Conintue ")
// cast a ray from marker and see if it hits anything
var props = Entities.getEntityProperties(_this.entityID, ["position", "rotation"]);
var pickRay = {
origin: props.position,
direction: Quat.getFront(props.rotation)
}
var intersection = Entities.findRayIntersection(pickRay, true);
if (intersection.intersects) {
print("INTERSECTION!")
}
},
preload: function(entityID) {
this.entityID = entityID;
}
};