-
I am creating few sprites using point mesh and I want to add onClick function to it, but it seems like it only fires up when you click at the center of point(sprite), if you click away from center it does not fires up. is that an issue? Also the thing i noticed is that it works better with small sized points that bigger one. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
solved this by using plane with instanced mesh and made it facing camera all the time using the code below Idk if there is any extra performance hit with using instanced mesh plane instead of point mesh but working pretty nice right now and click function is firing up properly unlike with point mesh , also its great since I can also use different texture, color and scale for every mesh. Answering my own question just in case anyone in future stuck into same problem |
Beta Was this translation helpful? Give feedback.
solved this by using plane with instanced mesh and made it facing camera all the time using the code below
dummy.quaternion.copy(camera.quaternion)
Idk if there is any extra performance hit with using instanced mesh plane instead of point mesh but working pretty nice right now and click function is firing up properly unlike with point mesh , also its great since I can also use different texture, color and scale for every mesh.
Answering my own question just in case anyone in future stuck into same problem