benny282
New Coder
I am wrinting a script for a FPS game and it is giving me error: CS1061
Here is the code i am using:
Here is the code i am using:
C#:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
public Rigidbody2D theRB;
public float moveSpeed = 5f;
private Vector2 moveInput;
private Vector2 mouseInput;
public float mouseSensitivity = 1f;
void Start()
{
}
void Update()
{
moveInput = new Vector2(Input.GetAxis("Horixontal"), moveInput.GetAxis("Vertical"));
theRB.velocity = moveInput * moveSpeed;
}
}
Last edited by a moderator: