(I’m new).
I need to jump high ( one shot) when i collide on a box.
Someone can help me?
You should checkout the Unity documentation for some of the methods you can use. But for your question, your code should look like this:
class box : monodevelop
{
public int extraSpeed;
int playerJumpSpeed;
bool jumpedOnThis;
OnTriggerEnter()
{
if (jumpedOnthis == false)
{
playerJumpSpeed += extraSpeed;
jumpedOnThis = true;
}
}
}