Mastering Shopify 3D Models: How to Lock Vertical Rotation for a Seamless Product Experience

Hey everyone! As your Shopify migration expert and community analyst, I spend a lot of time digging through the forums to find common pain points and brilliant solutions. Lately, I've seen a growing interest in bringing 3D models to product pages, which is fantastic for engaging customers!

But, as with any cool new tech, there are always a few quirks to iron out. I recently stumbled upon a really insightful discussion where a store owner, FrogMan25, was trying to get a "clean, controlled inline 3D experience" on their Shopify store. Specifically, they were battling with Shopify's built-in element, trying to achieve a very specific interaction: horizontal rotation only, with vertical (up/down) rotation completely disabled.

The Challenge: Locking Vertical Rotation on Shopify's 3D Viewer

FrogMan25 laid out their goals clearly. They wanted customers to interact with the 3D model directly on the product page, not in a new tab, and critically, they wanted to restrict rotation to only left and right. This is a common desire for many products where an up-and-down tilt doesn't add much value and can sometimes make the model feel less stable or harder to control for the user. They even shared an example from Albany Park, which demonstrates this exact controlled experience.

Here's a visual of what they were aiming for:

Example of 3D model with locked vertical rotation

The Solution: Leveraging camera-orbit and Other Attributes

Thankfully, another helpful community member, PaulNewton, jumped in with some direct and actionable advice. The key to locking vertical rotation lies in a specific attribute of the element itself: camera-orbit.

How to Implement Horizontal-Only Rotation

To restrict your 3D model to horizontal rotation, you'll need to modify the tag in your Shopify theme's code. Here's what PaulNewton suggested:

  1. Locate your tag: This is typically found within your product template files (e.g., product-template.liquid or a section file like main-product.liquid). You might need to use the theme editor's 'Edit code' feature.

  2. Add the camera-orbit attribute: You'll want to add either camera-orbit="auto 90deg" or camera-orbit="0 90deg" to your element. The 90deg value here essentially locks the vertical angle (also known as the polar angle) of the camera, preventing it from moving up or down.

    So, your code might look something like this:

    
    >
  3. Consider disable-zoom: PaulNewton also mentioned disable-zoom as another useful attribute. If you want a completely fixed view and prevent users from zooming in or out, you can add this attribute as well:

Remember to save your changes in the theme editor after making these modifications!

Beyond the Code: Important Considerations for 3D Models

While the camera-orbit attribute is a fantastic solution for controlling interaction, PaulNewton brought up a crucial point that often gets overlooked:

"Note that just because you declare something in html/js doesn’t not mean the actual 3D file will magically behave in certain ways it wasn’t built for or doesn’t support."

This is gold! It means that while you can control the viewer's behavior with HTML attributes, the underlying 3D model file itself needs to be optimized and correctly prepared. If your model isn't properly scaled, centered, or has issues with its origin point, it might not display exactly as you expect, even with the right camera-orbit settings. Always ensure your 3D assets (GLB files for Shopify) are professionally made and optimized for web use.

When 3D Models Might Be Overkill

PaulNewton also offered a valuable alternative perspective: sometimes, a full 3D model might be more than you need. He suggested that in some cases, a 360-degree image approach or even a 360-degree video could be a better fit. These options can offer a similar interactive viewing experience without the potentially higher file sizes and rendering demands of a full 3D model, which can be beneficial for page load times and overall site performance, especially on mobile devices.

Wrapping It Up

It's awesome to see store owners like FrogMan25 pushing the boundaries of product presentation and experts like PaulNewton sharing their knowledge so freely in the Shopify community. Implementing these simple attributes can significantly enhance your product pages by providing a more controlled, intuitive, and polished 3D experience for your customers.

By locking vertical rotation, you guide your customers' focus exactly where you want it, making the interaction feel smoother and more professional. Just remember to always consider your 3D model's preparation and whether a simpler 360-degree alternative might suit your product and audience even better. Happy modeling!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases