# 3D rotation changes shape of object?

**URL:** <https://discourse.processing.org/t/3d-rotation-changes-shape-of-object/34550>\
**Category:** Coding Questions\
**Created:** [January 10, 2022, 1:12am UTC](https://discourse.processing.org/t/3d-rotation-changes-shape-of-object/34550 "2022-01-10T01:12:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenjones](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kenjones](https://discourse.processing.org/u/kenjones)\
**Post date:** [January 10, 2022, 1:12am UTC](https://discourse.processing.org/t/3d-rotation-changes-shape-of-object/34550/1 "2022-01-10T01:12:29Z")

</div>

I am developing a WebGL sketch on [openprocessing.org](http://openprocessing.org) and I’ve run into a problem. When I apply a specific sequence of rotations my object retains its shape until I get to one rotation. Applying that rotation causes a drastic change in the shape of my object. Can someone explain to me what’s going on and tell me how I can fix the problem?

My sketch is here: [Platonia - OpenProcessing](https://openprocessing.org/sketch/1431672)

Just press any key two times to step through the first two rotations, which work as expected. Then press any key one more time and watch the strange change in the shape of the object as it rotates.

The part of the code that causes the problem is below the comment “// rotating into position to see the cube”.

Thank you!  
–Ken

---

<div class="post-metadata">

**Author:** ![KumuPaul](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kumupaul/32/13072_2.png) [@KumuPaul](https://discourse.processing.org/u/KumuPaul)\
**Post date:** [January 10, 2022, 4:27am UTC](https://discourse.processing.org/t/3d-rotation-changes-shape-of-object/34550/2 "2022-01-10T04:27:02Z")

</div>

You are missing a `break;` statement and the end of the ` case presentationModes.cube:` case.

---

<div class="post-metadata">

**Author:** ![kenjones](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kenjones](https://discourse.processing.org/u/kenjones)\
**Post date:** [January 10, 2022, 4:39am UTC](https://discourse.processing.org/t/3d-rotation-changes-shape-of-object/34550/3 "2022-01-10T04:39:13Z")

</div>

Duh… A stupid error I needed a second pair of eyes to see. Thank you very much!!
