I would recommend trying it Bálint's way first, because it is much easier to implement, but here is a CPU only solution. The reason you may want to go with this solution is if the extra rendering pass and CPU/GPU communication is giving you performance problems.
You know the position/orientation of the Billboard and Ray, so you can do a series of Ray/...
When you need to do pixel perfect mouse picking with non geometric objects (e.g. sprites) it's usually better to simply let the GPU handle the pixel part.
Render your pickable objects into a framebuffer with a solid, distinct color based on an index (there are 2^24 different indexes you can have, you probably won't run out of them), then simply sample the ...
if you want to detect collision or trigger between two object with colliders, at least one of them should have rigidBody.
if you dont want physics interactions, you can make rigidBody as kinematic. then that object has to gravity or physics.... but still you can use collision detection.
When equipping items, it really is best to have them be separate from the rest of the sprite. Unless there are only a handful of items in the entire game that can appear to be equipped, it takes a lot of effort to remake every animation for every item. Additionally, if the player can have multiple items simultaneously, you will need to animate every ...
// assume "sprite" is your Sprite object
var croppedTexture = new Texture2D( (int)sprite.rect.width, (int)sprite.rect.height );
var pixels = sprite.texture.GetPixels( (int)sprite.textureRect.x,
To do this, you will need:
1 controller/administrator/creator object (obj_Hades in my project)
1 global variable (global.number in my project)
The controller object (obj_Hades) will basically serve for you to declare the global variable (global.number).
Note that a sprite contains 3 images/frames:
In the controller object (obj_Hades):
Be careful to ...