Is is possible to get/set userData of a single object within InstancedMesh?

Is is possible to get/set userData of a single object within InstancedMesh?

I’m looking to use raycaster to select the object and get the userData of that object.

@Konrad_Psiuk

The raycaster’s intersection data contains instanceId. You can use the original userData as an array of individual userData-s of instances. When you get the instanceId, you just get the instance’s data from userData[instandeId]. Hopefully.

– Pavel

1 Like

Should’v think of that. :man_facepalming:t2: Thanks.