Co-Developer of CyberFighter and Pewee Power
VideoNotebook: https://www.youtube.com/channel/UCvHRh6CXBEnQZV-vNxJSGLw
Detailed Descriptions of some of the games I've made
https://docs.google.com/document/d/e/2PACX-1vQ29pJEL-XMvYbe9kYZ7KpDlPTR9lyIuYIJk...
Favourite Script that I have Coded?
This Player Controller that I coded in C# to make an enjoyable movement shooter,
using UnityEngine;
public class PlayerController : MonoBehaviour
{
public float moveSpeed = 5f;
public float jumpForce = 10f;
private Rigidbody rb;
private void Start()
{
rb = GetComponent<Rigidbody>();
}
private void Update()
{
// Movement
float horizontalInput = Input.GetAxis("Horizontal");
Vector3 moveDirection = new Vector3(horizontalInput, 0f, 0f) * moveSpeed;
rb.velocity = new Vector3(moveDirection.x, rb.velocity.y, rb.velocity.z);
// Jumping
if (Input.GetButtonDown("Jump") && Mathf.Abs(rb.velocity.y) < 0.01f)
{
rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
}
}
}