Control rotation of a 3D object using the touchscreen

by Mac » Thu, 27 Jan 2011 12:32:06 GMT

Sponsored Links
 Hello all, I'm a 4th year computer engineering student and have some
experience with Android dev.

I am working on an application that has a 3D component to it which
requires me to be able to rotate it around. I was looking at the
example at the android resources site. 

This example does not talk about rotation around the z-axis. I have
already tried using Quaternion for the rotations but I don't
understand how to get rotations around the z-axis

I was wondering if anyone can help me with learning how to just be
able to rotate around an object. like the example above but also
around the z-axis. I have already spend about 24 hours searching and
trying to figure this out.

The bigger issue is that once you rotate 90 degrees around the y-axis
how can you detect that the next rotation (going vertically on the
touchscreen) should be around the z-axis.

Thank you in advance.


Other Threads

1. Porting A Game from Java2d...


I am completely new to programming on mobile devices. I have a basic
game which I created using eclipse and java, mainly using Java2D to
create the game. Does anyone know how I would go about porting this to
be able to be used with android? Should it be reasonably simple?

 I tried copy and pasting the  majority of it but it said I couldnt
use java2d with the android plug in.

Any help is much appreciated,



2. Activity objects in memory after onDestroy.

Hi everyone,

I have a activity MyActivity, which "kills" yourself using the finish
() method.

The problem is: after the kill operation, method onDestroy is called,
but the object of type MyActivity is never garbage-collected (I forced
the GC run). It is causing a memory leak, because MyActivity is
launched many times, by other activities.

Does anyone know when the Activity object is supposed to be garbage-
collected, and what can be done to avoid the issue I mentioned?

Thanks in advance.

Felipe Silveira


3. Sending an email

4. Writing specific apps for clients

5. Publishing to Android market - question

6. Accessing images using content provider

7. Launch an app from within the native Contacts app