OS: windows 10
Browser: chromium 120 x64
GPU: nv gtx 1050 2gb
Version: 7.13.1
Desc: Using scene.pick to pick a point of a mesh loaded from a glb model, but the point is on the camera instead of on mesh.
Playground:
Expected:
Picked point (shown by a box in the playground) on the mesh
Actual:
Picked point at somewhere on the camera
@roland@RaananW
In the example, the size of the box is not some random fixed value, but computed from scene world extends, so the size should not be an issue here.
To futher confirm that, I’ve made a new playground here, which spawns an instance on pointer up (click):
The screenrecording is also updated to the main thread.
Yes, it’s done on cpu, the data used for picking is extracted from geometry using VertexBuffer.GetFloatData, and the model contains some unaligned buffer, instead of copying data to a new buffer, VertexBuffer.GetFloatData aligns pointer, so it reads wrong data from buffer.
Unfortunately, I am totally unsure of this PR and we will need to wait for @bghgary to be back as it looks like a regression from his PR from last week. he ll be back on Monday.