Skip to content

Commit

Permalink
document projectedZ and worldIntersectPoint in object.js
Browse files Browse the repository at this point in the history
  • Loading branch information
benptc committed May 11, 2022
1 parent 2549180 commit a4b9284
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/objectDefaultFiles/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,12 @@
screenY: eventData.y
});

// this adds the depth (relative to the camera) of the touch coordinate raycasted against the world
if (typeof eventData.projectedZ !== 'undefined') {
event.projectedZ = eventData.projectedZ;
}
// this adds the 3D scene coordinates of the touch raycasted against the world
// currently it is world coordinates relative to the groundPlaneContainerObject
if (typeof eventData.worldIntersectPoint !== 'undefined') {
event.worldIntersectPoint = eventData.worldIntersectPoint;
}
Expand Down

0 comments on commit a4b9284

Please sign in to comment.