I am relatively new to Unity. I have completed the Roll-A-Ball tutorial and have moved on to the Space Shooter Tutorial. I have two questions. One, when do yall think Space Shooter will be updated for Unity 5? My second question is a little more technical. Not having a reliable 5.0 tutorial, I have had to make a go of it on my own. I have come across one issue at this point that I can not seem to resolve. My player moves but I cant adjust its speed. Here is a copy of my current script. Thank You for any help yall might provide.
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public float speed;
public Rigidbody rb;
void Start()
{
rb = GetComponent ();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis (“Horizontal”);
float moveVertical = Input.GetAxis (“Vertical”);
if (Input.GetButton (“Horizontal”))
rb.velocity = new Vector3 (moveHorizontal, 0.0f, moveVertical);
if (Input.GetButton (“Vertical”))
rb.velocity = new Vector3 (moveHorizontal, 0.0f, moveVertical);
}
}
P.S.
I did try to combine the two “if (Input.GetButton…” parts of the scrip but it would only let my player move diagonally. I did it like this. “if (Input.GetButton (“Horizontal”, “Vertical”))” and I got the message about two arguments where only one can exist. If yall have any other suggestions on how I might simplify that particular text for 5.0, so it’s not redundant or using unnecessary memory, I would appreciate it. Thanks again yall.