Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Templates
Packs
This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.
1/16
loading
loading
loading
loading
loading
loading
This package contains all assets and code required to create an interactive Rubik Cube of varying sizes.

WebGL demo

This package has two main goals:
• Providing you with a starting point to build your own interactive Rubik cube application
• Act as a learning project for those interested in the 3D math behind implementing such a cube

The package provides an optimized implementation that allows for cubes of arbitrary sizes without the use of extensive ray casting (the provided sample scene demonstrates cube sizes 2 to 9, but you can go higher if you wish). In addition the package is divided in clear classes that can be reused as is, or adapted to your needs as you see fit.

Contents
• Clear, cohesive and extensively documented classes (note that reading the comments and understanding the source code does require a fundamental understanding of vectors, matrices, dots, crossproducts and left & right handed coordinate systems).
• A UV-ed cublet mesh with realistic albedo, normal and smoothness textures (.psd included)
• A cublet.blend file with high and low poly cublet meshes included
• A sample scene demonstrating all the features

Most important classes and features
• RubikCube class: contains core cube definition, rotation and undo features and the ability to check if the cube is solved or not
• DiscRotator: transforms your mouse actions into disc rotation actions on the RubikCube
• CubeRotator: transforms your mouse actions into 90 degree rotations on the cube as a whole
• CameraMouseOrbit: transforms your mouse actions into free orbit camera movements
• AxisDisplay: shows the orientation of your cube on the top right of your screen as a gizmo
• RubikCubeInitializer: shows you how to spawn a cube of a specific size and handle its lifetime

Package limitations:
• This package doesn't come with a cube solving algorithm
• All the rubik cubes are built up dynamically using the same prefab for every cublet, in other words there is no distinction between corner, edge and center pieces.
• There is no side introspection mechanism included, in other words, the cube can tell you whether it is solved or not, but you can't say "Give me the color of cublet R(2,2)" for example.
• The current controls are mouse based but located centrally and easily changed.

WebGL demo

Interactive Rubik Cube (x * x * x)

(not enough ratings)
60 users have favourite this asset
(60)
$7.99
Taxes/VAT calculated at checkout
22 views in the past week
License type: Single Entity
Single Entity
Recommended for individuals and small businesses.
Multi Entity
Recommended for large enterprises working across multiple locations.
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
2 years ago
Realistic and smoothly operating
Although this is described as a collection of assets supporting a custom game, the demo is a fine cube simulation as is, and operating it looks and fe...
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR