AlexShad
New member
- Joined
- Aug 14, 2019
- Messages
- 1
- Programming Experience
- 1-3
I am creating a Player Movement script in Unity C# and it is not working. Please review my code and tell me the problem.
C#:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
// Define stuff
public Rigidbody2d rb;
private Movement = Input.GetAxis("Horizontal");
private float Jump = Input.Button("Up");
private Vector2 Jump = new Vector2(0,);
public float speed = 10f;
// Physics
void FixedUpdate()
{
rb.AddForce(Movement * speed);
rb.AddForce(Jump * speed);
}
}
Last edited by a moderator: