# Using the PMatrix3D class in Android Studio

**URL:** <https://discourse.processing.org/t/using-the-pmatrix3d-class-in-android-studio/248>\
**Category:** Processing for Android\
**Created:** [May 22, 2018, 8:00am UTC](https://discourse.processing.org/t/using-the-pmatrix3d-class-in-android-studio/248 "2018-05-22T08:00:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yassin](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yassin](https://discourse.processing.org/u/yassin)\
**Post date:** [May 22, 2018, 8:00am UTC](https://discourse.processing.org/t/using-the-pmatrix3d-class-in-android-studio/248/1 "2018-05-22T08:00:33Z")

</div>

I’m developing a game for Android, it’s a 3D platform where you move a ball depending on the position of the phone. Everything is set up for the development, I have the processing core jar dependency included, it’s not the first time that I work with Processing in Android Studio.

However, it’s the first time that I use the 3D The problem is that when I call functions like rotateX() or rotateY(), Android Studio tells me that he cannot find the method, even when the package is imported. I get the error "Cannot resolve method ‘…’ "

If someone already faced that issue, let me know. I’ll look for solutions on my side.

---

<div class="post-metadata">

**Author:** ![yassin](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yassin](https://discourse.processing.org/u/yassin)\
**Post date:** [May 22, 2018, 8:35am UTC](https://discourse.processing.org/t/using-the-pmatrix3d-class-in-android-studio/248/2 "2018-05-22T08:35:44Z")

</div>

**Promblem solved!**

I’m working on multiple classes on this project, so I created separated classes and I imported the libs on top of each of them. I found out that importing the classes in a class that is not a processing Sketch will not work.

In order to make it all work, I created the class within the Sketch class, and it works perfectly.

I hope this will help someone in the future.

---

<div class="post-metadata">

**Author:** ![Andres](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/andres/32/18007_2.png) [@Andres](https://discourse.processing.org/u/Andres)\
**Post date:** [May 23, 2018, 9:55pm UTC](https://discourse.processing.org/t/using-the-pmatrix3d-class-in-android-studio/248/3 "2018-05-23T21:55:47Z")

</div>

Hi, thanks so much for posting your question, and the solution your found eventually!

Regarding the imports in Android Studio, yes, you need to add them explicitly. When running your sketches from the PDE, there is no need for that since the Processing preprocessing adds all the required imports. You could also do `import processing.core.*;` to import all core classes into your code.
