Original title: can someone make a script on it in java
i want to know the script which do this thing
if body1 touches body2 than body1.visible=false
Original title: can someone make a script on it in java
i want to know the script which do this thing
if body1 touches body2 than body1.visible=false
A) There is no Java in Unity. There is, however, JavaScript also referred to as UnityScript. JavaScript has nothing to do with Java ;-)
B) What you are looking for is this:
C) If you need to learn programming, you could try one of the tutorials, e.g. start with this answer: How to get started learning JavaScript or UnityScript?
why don't you just set the renderer.enabled= false;? That will make Unity forget about rendering that object and it will be invisible, un-interactive, un-responisve, etc. It'll be like it never existed until you reset the renderer.enabled to true again. So write the code, but if what I illustrated is what you are looking for then you at least have a hint of where to start.