Wrong result of PickingInfo.getNormal with thin instances

OS: any
Engine: any
Version: 5.57.1 ~ 7.54.1
Playground:

Steps to reproduce:

  1. Click the plane
  2. Look at the lines

Expected:
Normals should be perpendicular to the plane

Actual:

Code:

Thanks for reporting, this PR will fix the problem:

Note that you have to enable thin instance picking for this to work (ground.thinInstanceEnablePicking = true).

1 Like

Seems ci failed.

This should be fixed.

1 Like

Should picking thin instance mesh be skipped if thinInstanceEnablePicking not enabled? Current code picks it like it does not have thin instances, false positives might be produced. (But this is breaking old code depending on this behavior)

It’s by design, thinInstanceEnablePicking indicates that the picking should go to the thin instance level when/if the mesh has thin instances, it’s not a global picking on/picking off switch. It comes in addition to the Mesh.isPickable switch.