intersecting

This commit is contained in:
ericrius1 2016-02-19 09:49:22 -08:00
parent 39d4fbf19d
commit f4ee9acb9c
2 changed files with 6 additions and 1 deletions

View file

@ -39,14 +39,17 @@
direction: Quat.getFront(props.rotation)
}
var intersection = Entities.findRayIntersection(pickRay, true);
var intersection = Entities.findRayIntersection(pickRay, true, [], [_this.entityID]);
if (intersection.intersects) {
var name = Entities.getEntityProperties(intersection.entityID);
print("intersection")
}
},
preload: function(entityID) {
this.entityID = entityID;
print("EBL PRELOAD");
}
};

View file

@ -27,6 +27,7 @@ var WHITEBOARD_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Whiteb
var WHITEBOARD_COLLISION_HULL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Whiteboard.obj";
var whiteboard = Entities.addEntity({
type: "Model",
name: "whiteboard",
modelURL: WHITEBOARD_MODEL_URL,
position: whiteboardPosition,
rotation: whiteboardRotation,
@ -63,6 +64,7 @@ var marker = Entities.addEntity({
y: 0.0272,
z: 0.1641
},
name: "marker",
script: MARKER_SCRIPT_URL
});