Hello, my player is shooting to the side. Can someone help me make it shoot from the front. The Offset Variable is set to 20. Here is my script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Shoot : MonoBehaviour {
public GameObject projectilePrefab;
GameObject projectileInstance;
public float offset;
public float offsetTwo;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.V)) {
Instantiate (projectilePrefab, transform.position + (transform.forward * offset), transform.rotation);
}
}
}