Beispiel #1
0
    void Start()
    {
        m_start = transform.position;
        m_end   = m_start + transform.forward * m_distance;

        m_psi   = GetComponent <PSI.Rigidbody>();
        m_unity = GetComponent <Rigidbody>();
    }
Beispiel #2
0
    void Start()
    {
        m_start = transform.position;
        m_end   = m_start + transform.forward * m_distance;

        m_psi   = GetComponent <PSI.Rigidbody>();
        m_unity = GetComponent <Rigidbody>();

        if (m_psi.enabled)
        {
            m_psi.AddForceAtPoint(transform.forward * m_impulse, transform.position - transform.forward + transform.up, ForceMode.Impulse);
        }
        else
        {
            m_unity.AddForce(transform.forward * m_impulse, ForceMode.Impulse);
        }
    }