I have a script that I got from a shooting script with spacebar. I edited this script to just place the item, but i use first person controller. When I press space, I jump and place an Item. Can I change it to left click?
var bulletprefab:Transform;
function Update () {
if(Input.GetButtonDown(“Jump”))
{
var Bullet = Instantiate(bulletprefab, GameObject.Find(“Spawn point”).transform.position, Quaternion.identity);
}
}
@script RequireComponent(CharacterController)
Also Another question. Is there a way to get rid of the item with the spawn point touching it and with left click?