I’have created some sprites an added them to the scene.
What i want to achieve is to change the sprite image when i click on it.
So I added Raycast and all the stuffs.
The problem is that the clicked sprite need to maintain the actual image and i have to add a semi trasparent image on it, so basically compose the 2 images.
How could i do this?
PS. Now when the click is intersected by raycast i only change the color of the image.
Why? Can you please elaborate a bit?
Ok, This is the image as a sprite
After clicking them it sould appera like this
The blue circle can be any image, ( a house, a dog…) and the yellow one needs to indicate that that circle has been selected.
My problem is how to pass the composed image to the SpriteMaterial.map or to find a better way to achieve this.
How about using two sprites? One sprite could be a child of the other one. Or you are using the new group feature that comes with the next release (
R101). That means you pass both sprites into a single instance of
THREE.Group and apply a render order e.g
1 to the group. Sprites in the group are then sorted and rendered together.
I think i will use 2 sprites (One child of another).
Tanks for the support.