So i have a grapple hook in my game i want to have a level where you can pull the wall down (deleting so the object) and the grapple hook uses a line render and since i am really dumb none of the script i have make work could anyone please help me. also i think Ray Cast would work but i don’t really know.
Here is my latest kinda working script it just deletes right away (due to Update)
using UnityEngine;
using System.Collections;
public class BreakWall : MonoBehaviour {
private LineRenderer lr;
void Start()
{
lr = GetComponent<LineRenderer>();
}
void Update() // consider void FixedUpdate()
{
RaycastHit hit;
Destroy(gameObject);
}
}