Hello, my character it’s stopping alone when move.
Started when update Unity.
My script:
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Security.Cryptography;
using UnityEngine;
public class Jogador : MonoBehaviour
{
public Rigidbody2D rigidbody2d;
public float move;
private float direction;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
direction = Input.GetAxisRaw(“Horizontal”);
rigidbody2d.velocity = new Vector2(direction* move, rigidbody2d.velocity.y);
}
}
Someone plz help me