Hello to everyone! I’m pretty new on scripting on C# so I’ve a script that isn’t working still doesn’t know why, any ideas? Here is the script:
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
public class Movimiento2D : MonoBehaviour {
private Rigidbody2D rb2d;
void Start()
{
rb2d = GetComponent();
}
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis(“Horizontal”);
float moveVertical = Input.GetAxis(“Vertical”);
Vector2 movement = new Vector2(moveHorizontal, moveVertical);
rb2d.AddForce(movement);
}
}