void AttachToPincet(PincetBehaviour pincet) { this.sampleSpring.spring = conSpringStiff; sampleSpring.GetComponent<Rigidbody>().drag = this.sampleSpringDrag; if(!sampleSpring.connectedBody) { sampleSpring.connectedBody = pincet.pincetTip.transform.GetComponent<Rigidbody>(); sample.transform.position += pincet.pincetTip.transform.position - this.transform.position; } }
void AttachToPincet(PincetBehaviour pincet) { this.sampleSpring.spring = conSpringStiff; sampleSpring.GetComponent <Rigidbody>().drag = this.sampleSpringDrag; if (!sampleSpring.connectedBody) { sampleSpring.connectedBody = pincet.pincetTip.transform.GetComponent <Rigidbody>(); sample.transform.position += pincet.pincetTip.transform.position - this.transform.position; } }