Hello
Indeed there is a strange bug after mouse click (when adding clones of the splat).
After some tests, I think it comes from the clone + repositioning, more than the mouse stuff.
But putting this bug apart, I’m wondering what exactly you are trying to achieve here ? This logic :
- Pick on every frame
- Move picked object at pickedPoint
Is somehow an infinite loop. With a normal mesh (with volume), it would quickly lead to the mesh being stuck in camera (moved toward camera on each frame)
Also, I think that CPU picking on a Splat is not possible since anyway, there is only 1 plane (2 triangles) to be picked. The rest is on GPU side. As you can see here, moving a cube on pickedPoint :
The picking is actually happening on the XZ plane :
I think in order to pick an actual 3D point inside a Splat, you would need a GPU picking, but the current version is not returning pickedPoint
, as far as I know. And anyway, even with a pickedPoint, you would most likely have a strange behavior due to the number of semi transparent shapes all over the volume of the splat
I think “dot operation, model will blink” means that after you click and clone the model the models start to blink. It seems there is an issue cloning the splat mesh.
Yep. That’s why I said :
Seems so.
Hit space a few times to create clones.
Now try to move the clones along the Z axis using the Inspector. (X, Y not affected). Or try to move the original “Halo” mesh in any direction.
It will result in:
cc @Cedric
It looks like the cloned GS doesn’t have a good BB. I’m taking a closer look.
Well played Playground
On Mac:
After calling clone()
the mesh shrinks (all clones shrinks):
a few frames later it is appears correctly:
Yes, it’s a known issue related to, I guess, the webworker. I’ve put a comment about it in the PR.
@Cedric thanks!
For future reference here it is:
PR’s been udpated.
Did you fix the webworker stuff?
Unfortunately the bug persists:
Shouldn’t be the clone
function async
? Cloning blocks out the main execution thread quite badly…
this 1 frame delay is already visible in the current state. It’s not related to webworkers but on the GPU/transfer side of things.
I guess texture transfer and/or shader compilation. I tried a few things to add a delay but nothing working.