Hello Everybody,
I have a small problem and i need your helps. I write a script as named CollisionController.js and attached to my object.
CollisionController.js ;
function OnCollisionEnter(collision : Collision){
if (collision.gameObject.tag == "BuildObject")
{
renderer.material.color = Color.red;
} }
I created a new cube as tagged "BuildObject" and i added rigidbody and box collider with checked isTrigger to another object. But my object when touch to this object i can't change my object color.
Where is my problem can you help me ?