using System.Collections; using System.Collections.Generic; using UnityEngine; public class GrappleAttachment : MonoBehaviour { public bool CollisionStuck; public float ThrowForce = 20.0f; // Start is called before the first frame update void Start() { GetComponent().constraints = RigidbodyConstraints.None; // GetComponent().AddForce(Vector3.forward * ThrowForce); } // Update is called once per frame void Update() { } void OnCollisionStay() { CollisionStuck = true; GetComponent().constraints = RigidbodyConstraints.FreezeAll; } }