예제 #1
0
    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;
        }
    }
예제 #2
0
    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;
        }
    }