var pickResult = viewer.scene.pick({
canvasPos: coords,
pickSurface: true // <<------ This causes picking to find the intersection point on the entity
});
if (pickResult) {
const sectionPlane = sectionPlanes.createSectionPlane({
pos: pickResult.worldPos,
dir: math.mulVec3Scalar(pickResult.worldNormal, -1)
});
}
If the picked surface is not axis-aligned, the section place is not parallel to the surface.
If the picked surface is not axis-aligned, the section place is not parallel to the surface.
On ortho from above, it's easier to see:
To Reproduce It also appears on xeokit's example https://xeokit.github.io/xeokit-sdk/examples/#gizmos_SectionPlanesPlugin_createWithMouse
It was hard to find a non-axis-aligned surface on this model. The section is on the railing.
The problem is the same withe xkt v6 and xkt v3
Expected behavior The section to be strictly parallel to the picked surface