Hi there, Quick question. Probably another small one that I will facepalm about later,
using UnityEngine;
using System.Collections;
public class Cover : MonoBehaviour {
public Transform Player;
void OnTriggerStay (Collider other)
{
if(Input.GetButtonDown("Cover")){
Movement.inCover = true;
Player.position = new Vector3 (Player.position, 1, Player.position);
}
if (Input.GetButtonUp("Cover")){
Movement.inCover = false;
}
}
}
I am getting the error regarding issues with Vector3 float, float, float. I know it is something to do with me using Player.position but I want to keep the Player position for the x and z axis and only change the y axis position. Do I have to define where it is, I though thats what transform was for
Cheers,