Hello there everyone!
I really need a script that like if you touch a cube it plays an animation.
I’ve been working really hard to find one but can’t find one.
Cya!
That’s not specific enough to give your a complete script, but I would give the cube a tag, lets say “cube”
And use
function OnCollisionEnter(collision : Collision)
{
if(collision.tag = “cube”)
{
animation.Play()
}
}
Pardon any minor errors, i haven’t had time to check it in MonoDevelop.