Breaking down a 3D Interactive Menu in Unity.
by Vicente C.
Published |
27
Share
Mert Emir Erte showed how the new 3D menu in Paws and Shine works in Unity, using raycasts, physical interactions, and shader effects.
3D artist and developer Mert Emir Erte showed the new 3D menu they made for Paws and Shine, an upcoming cozy decorating game set on a cat island, where players can clean, restore, and decorate different spaces.
It starts by the menu constantly sending a raycast from the camera toward the mouse position, and if that ray hits one of the button colliders, the game knows the player is interacting with it.
void Update() {

    Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);

    if (Physics.Raycast(ray, out RaycastHit hit)) {

        if (hit.collider.gameObject == this.gameObject) {

            ApplyHoverEffects();

            if (Input.GetMouseButtonDown(0)) {
                StartCoroutine(PressAnimation());
            }
        }
Since the buttons are real 3D objects inside the scene, Mert added a few extra effects to make hovering and clicking feel more satisfying.

When the cursor moves over a button, the object scales up slightly over time using Vector3.Lerp so the transition feels less abrupt. The buttons also change color using a MaterialPropertyBlock, which lets the game update material values .
For the glow effect, the text and icons use a separate material assigned in Blender, so only the glowing parts need to be updated when the player hovers a button. During the interaction, the emission intensity is smoothly increased through code.
propBlock.SetColor("_Color", targetColor);
buttonRenderer.SetPropertyBlock(propBlock);

currentEmissionColor = Color.Lerp(
    currentEmissionColor,
    targetEmissionColor,
    Time.deltaTime * transitionSpeed
);

emissionMaterial.SetColor("_EmissionColor", currentEmissionColor);
Clicking a button also has its own small animation, and not only code running in the background, the button moves backward a bit and quickly returns to its original position using a Coroutine.

According to Mert, that small movement, combined with the glow flash and the click sound, was meant to make the interaction feel more like pressing a real mechanical button.
IEnumerator PressAnimation() {

    Vector3 pressedPos =
        originalLocalPos - Vector3.forward * pressDepth;

    float elapsed = 0f;

    while (elapsed < pressDuration) {

        elapsed += Time.deltaTime;

        transform.localPosition = Vector3.Lerp(
            originalLocalPos,
            pressedPos,
            elapsed / pressDuration
        );

        yield return null;
    }

    ExecuteAction();
}
As Mert said, a big reason for building the menu this way was simply to stay inside an area they already felt comfortable with as a 3D artist.

If you want to see more from them or follow the development of Paws and Shine, the links will be right below.

Interested in learning more?
If you’re interested in learning shaders in Unity, The Unity Shaders Bible covers everything from the basics of Shader Graph and HLSL to more advanced topics like lighting models, ray marching, and compute shaders. 📘
Jettelly wishes you success in your professional career! Did you find an error? No worries! Write to us at [email protected], and we'll fix it!

Subscribe to our newsletter to stay up to date with our latest offers

© 2026 Jettelly Inc. All rights reserved. Made with ❤️ in Toronto, Canada