I am trying to make a snowboard game. For player rotation i used "Addtorque" It's working nice on Unity3D's Game Scene. But when i take Build it (MacOs and WEBGL) i can't rotate player so Addtorque doesn't work. Can someone help me?
void control()
{
if (Input.GetKey(KeyCode.A))
{
rb2d.AddTorque(torqueAmount);
}
if (Input.GetKey(KeyCode.D))
{
rb2d.AddTorque(-torqueAmount);
}
if(Input.GetKey(KeyCode.Space))
{
surfaceEffector.speed = speedUp;
}
else
{
surfaceEffector.speed = baseSpeed;
}
}
}