- Home /
This question was
closed Aug 25, 2014 at 01:25 PM by
meat5000 for the following reason:
The question is answered, right answer was accepted
Question by
nketc · Aug 25, 2014 at 12:18 PM ·
c#javascriptcollider
Please change this line to Javascript?
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Pickup")
{
other.gameObject.SetActive(false);
}
}
Comment
@Harshad$$anonymous$$ yep i already have tried this, and had this error: Unexpected token: other.
You know you can set the examples in the Scripting API both in JS and C#, right?
Best Answer
Answer by HarshadK · Aug 25, 2014 at 12:19 PM
Here you go:
function OnTriggerEnter(other: Collider)
{
if(other.gameObject.tag == "Pickup")
{
other.gameObject.SetActive(false);
}
}
Follow this Question
Related Questions
How can to convert it on c#? 1 Answer
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Javascript version of 'Mouse look' script? 1 Answer
Read txt file into a game 1 Answer