AddTorque not working (solved)

this is my code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityStandardAssets.CrossPlatformInput;
    public class touchcontrol : MonoBehaviour
{
    float direcao;
    public Rigidbody playerrb;
    Vector3 torque = new Vector3(0f, CrossPlatformInputManager.GetAxis("Horizontal") * 17, 0f);


    public void Update()
    {

        playerrb.AddTorque(torque);

    }
}

it simply doesn’t add torque to my player :frowning:

Try this:

  • Use FixedUpdate instead of Update
  • Disable gravity in the rigidbody and leave it floating without contacting anything. You should see the torque effect here.

it didn’t work, I did some experimentation and apparently it applies the torque in the first frame only

I put the torque variable inside the fixedupdate and it worked, thanks