Skalowanie obiektu 3D przy użyciu kółka myszy

Obiekt 3D musi posiadać komponent Collider i skrypt z poniższym kodem.


    private void OnMouseOver()
    {
        transform.localScale += Vector3.one * Input.mouseScrollDelta.y * 0.1f;
    }

Ask ChatGPT
Set ChatGPT API key
Find your Secret API key in your ChatGPT User settings and paste it here to connect ChatGPT with your Tutor LMS website.
Scroll to Top