Dynamically creating objects with the ability to move them later (Rubik's cube) #456
Replies: 3 comments 1 reply
-
After more investigation it seems that using Still open to alternative suggestions if I've missed something better! |
Beta Was this translation helpful? Give feedback.
-
The thing I'm struggling with now is rendering the aabb for each instance.. I can render one aabb for the whole thing but I'd like to be able to render each instance's own aabb and I'm not seeing the right way to do it |
Beta Was this translation helpful? Give feedback.
-
Sorry for the late reply. You can certainly use instances, but unless you have millions of rubik's cubes, there's not a real need. Instead you can just represent each square as a mesh and render all meshes, one at a time. That way, it's hopefully easier to compute the AABB. |
Beta Was this translation helpful? Give feedback.
-
Really impressed with three-d so far! I have a simple cube that is actually made of squares so that I can have each one a different colour.
I'm now hoping to dynamically create the cube with each side made of multiple small squares - a Rubik's cube. I would like these squares to be generated given the state of an external type that simulates the Rubik's cube, and when that external type changes (rotating a side of the cube, would be triggered by user input for now), I would like to update the three-d objects to match the new state. I'm a little lost on moving from what I currently have to this dynamically generated approach, so would love some pointers on where I can look for examples of this!
Beta Was this translation helpful? Give feedback.
All reactions