# PShape.rotateZ() bug?

**URL:** <https://discourse.processing.org/t/pshape-rotatez-bug/17509>\
**Category:** Coding Questions\
**Created:** [February 2, 2020, 4:49am UTC](https://discourse.processing.org/t/pshape-rotatez-bug/17509 "2020-02-02T04:49:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 2, 2020, 11:43am UTC](https://discourse.processing.org/t/pshape-rotatez-bug/17509/3 "2020-02-02T11:43:41Z")

</div>

Hello,

Welcome to the Processing forum.

There is a rotateZ() bug in versions 3.5.\*

It is fixed in the 4.0 alpha 1 Pre-Release.

Workaround:

```auto
    // ********BUG ??******** 
    //s.rotateZ(rot); // Bug
    s.rotate(rot, 0, 0, 1); // Rotates about z-axis
    translate(location.x,location.y,location.z);
    shape(s);

```

References:  
[Cannot run rotateZ() within the PShape class #5770](https://github.com/processing/processing/issues/5770)

[https://discourse.processing.org/t/rotate-function-with-4-arguments/5652](https://discourse.processing.org/t/rotate-function-with-4-arguments/5652)

[http://processing.github.io/processing-javadocs/core/](http://processing.github.io/processing-javadocs/core/) has some references:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3819b55a10fa951f9e76b09473c505da27402382.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/522dbb3e9c837a5e7c768c4b9c2b97882a5f39d0.png)

‘🙂’

---

_[View the full topic](https://discourse.processing.org/t/pshape-rotatez-bug/17509)._
