Exemplo n.º 1
0
    // Start is called before the first frame update
    void Awake()
    {
        rb = GetComponent <Rigidbody>();
        //rb.velocity = initialVelocity;

        forceVector    = Instantiate <GameObject>(vectorPrefab).GetComponent <VectorController>();
        velocityVector = Instantiate <GameObject>(vectorPrefab).GetComponent <VectorController>();

        forceVector.transform.SetParent(transform);
        velocityVector.transform.SetParent(transform);

        forceVector.transform.localPosition    = Vector3.zero;
        velocityVector.transform.localPosition = Vector3.zero;


        forceVector.setVectorColor(forceVectorColor);
        velocityVector.setVectorColor(velocityVectorColor);
    }