Пример #1
0
    // Update is called once per frame
    void Update()
    {
        transform.LookAt(Camera.main.transform);

        // Offset sprite vs suelo.
        var position = transform.parent.position;

        position          += Vector3.up * offset;
        transform.position = position;

        spriteRenderer.flipX = parentForce.getForce().x > 0;
    }