Skip to main content

3D gallery mouse movement interaction

In this guide, we’ll create an interactive 3D image gallery that responds to both horizontal and vertical mouse movement.

I
Written by Inbal Shemesh
Updated over 3 months ago

Step 1: Set up your 3D scene

  1. Inside your main parent frame, create a nested frame named camera

  2. In the Design panel, enable the 3D option for this frame

  3. Set Perspective = 600

  4. Place your image or text elements inside the camera frame

  5. Give them:

    • Uniform size (at first)

    • Same initial Z position

    • Custom positions on X and Y as you like

    • Varying Z values between -200 to 200

  6. Assign the same name to all these elements — e.g. 3d-object

📝 Note: Ensure each 3D element inside camera also has the 3D option turned ON in the design panel.


Step 2: Horizontal Mouse Movement Interaction

Create a parametric animation → set the action to Mouse Move Horizontal

Interaction Settings

  • Turn ON Smooth Animation

  • Area of Action: 3D Gallery 2 (the parent frame)

  • Layer of Interaction: use Class by name
    → Enter name-3d-object

Animation Properties

  • Enable: Move, Rotate 3D

  • Turn ON: Start from, Change to

Values:

  • Move (X-axis)

    • From: -50

    • To: 50

  • Rotate 3D (Y-axis)

    • From: -3°

    • To:

  • Duration: 1s


Step 3: Vertical Mouse Movement Interaction

Create a second parametric animation → set the action to Mouse Move Vertical

Interaction Settings
(Same as horizontal)

  • Turn ON Smooth Animation

  • Area of Action: 3D Gallery 2

  • Layer of Interaction: name-3d-object

Animation Properties

  • Enable: Move, Rotate 3D

  • Turn ON: Start from, Change to

Values:

  • Move (Y-axis)

    • From: -50

    • To: 50

  • Rotate 3D (X-axis)

    • From: -3°

    • To:

  • Duration: 1s

Did this answer your question?