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) direction: Quat.getFront(props.rotation)
} }
var intersection = Entities.findRayIntersection(pickRay, true); var intersection = Entities.findRayIntersection(pickRay, true, [], [_this.entityID]);
if (intersection.intersects) { if (intersection.intersects) {
var name = Entities.getEntityProperties(intersection.entityID);
print("intersection")
} }
}, },
preload: function(entityID) { preload: function(entityID) {
this.entityID = 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_COLLISION_HULL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Whiteboard.obj";
var whiteboard = Entities.addEntity({ var whiteboard = Entities.addEntity({
type: "Model", type: "Model",
name: "whiteboard",
modelURL: WHITEBOARD_MODEL_URL, modelURL: WHITEBOARD_MODEL_URL,
position: whiteboardPosition, position: whiteboardPosition,
rotation: whiteboardRotation, rotation: whiteboardRotation,
@ -63,6 +64,7 @@ var marker = Entities.addEntity({
y: 0.0272, y: 0.0272,
z: 0.1641 z: 0.1641
}, },
name: "marker",
script: MARKER_SCRIPT_URL script: MARKER_SCRIPT_URL
}); });