hi i am nooba t this to start! anyways i am making a pong game to practice my scripting and i want it so that when player presses up the object to move up on the y axis +1. so i had this:
using UnityEngine;
using System.Collections;
public class bat_right : MonoBehaviour {
public float bat_rightSpeed;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
float amntToMove = Input.GetAxis("bat_right") * bat_rightSpeed * Time.deltaTime;
transform.position = new Vector3(
}
}
i want it to not change x and z but to take current y postion and add one unit. is this possible and how would i do it?
thanks in advance