How to hide a sprite on top of another sprite when the lower one comes into contact with the player?
I am making a platformer where the player can pick up things from the ground. However, these things may be too small for the player to see, so I want to display a sprite on top of one of these things when the player steps over it inviting him to press some key to grab hold of the object. I have gone through all of the google searches to no avail, every answer I come across keeps telling me to use the sprite renderer and then disabling it, but I am unable to do so, since writing gameObject.renderer.enable = false; marks an error in Visual Studio. The banner on top of the object and the object itself are different sprites, what would you recommend I do?
Your answer
Follow this Question
Related Questions
Disable or hide GUI Buttons on one scene 2 Answers
Can someone please help me find out what wrong with my code. 1 Answer
Does anyone have a good script that can be used to make a horse/vehicle rideable? 0 Answers
Continuously monitor childrens properties 1 Answer
How would i modify my current script to remove these UI buttons without killing my pause menu? 1 Answer