Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xeokit/xeokit-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Jan 27, 2021
2 parents 631d29d + 7a5c2d4 commit 0a03432
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class PickController {

this.pickResult = this._scene.pick({
pickSurface: true,
pickSurfaceNormal: true,
pickSurfaceNormal: false,
canvasPos: this.pickCursorPos
});

Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scene/scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ class Scene extends Component {
pickResult = this._renderer.pick(params, pickResult);

if (pickResult) {
if (pickResult.entity.fire) {
if (pickResult.entity && pickResult.entity.fire) {
pickResult.entity.fire("picked", pickResult); // TODO: PerformanceModelNode doesn't fire events
}
return pickResult;
Expand Down
4 changes: 3 additions & 1 deletion src/viewer/scene/webgl/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,9 @@ const Renderer = function (scene, options) {
nearAndFar[1] = scene.camera.project.far;

pickWorldPos(pickable, canvasX, canvasY, pickViewMatrix, pickProjMatrix, nearAndFar, pickResult);
pickWorldNormal(pickable, canvasX, canvasY, pickViewMatrix, pickProjMatrix, nearAndFar, pickResult);
if (params.pickSurfaceNormal !== false) {
pickWorldNormal(pickable, canvasX, canvasY, pickViewMatrix, pickProjMatrix, nearAndFar, pickResult);
}
}
}
}
Expand Down

0 comments on commit 0a03432

Please sign in to comment.