Tuesday, September 7, 2010

Re: [android-developers] Re: OpenGL - 3D rotation from a 2D input

Thanks! =)



Thiago


On Tue, Sep 7, 2010 at 14:25, Robert Green <rbgrn.net@gmail.com> wrote:
I was going to suggest doing what they outline in that lesson.  In
short - keep a rotation matrix for the current orientation of your
cube.  Process input and keep a rotation matrix that you apply the
user input to, then multiply the cube matrix by and store the result
as the cube matrix, then reset the input matrix to identity and start
all over.

For user-space Z input rotation, you can do it like they do in the pro
3D apps - with a little button that shows that rotation to the left
and to the right.  Still use the same method as above, though, and you
will get very predictable, nice rotation on all axis.

On Sep 7, 11:39 am, alan <a...@birtles.org.uk> wrote:
> your first stop for all opengl questions should be NeHe open gl
> lessons:http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48
>
> On Sep 6, 9:58 pm, Thiago Lopes Rosa <thiago.r...@gmail.com> wrote:
>
>
>
> > This is a 3D Minesweeper. Instead of searching mines on that rectangular
> > field, you must search them on several 3D fields (8 in total) by looking in
> > all faces/planes. So you must rotate the objects to see all sides. (search
> > for: *3D Mines*)
>
> > I got the idea about different movements for each axis, but I really wanted
> > to use dragging for all axis.
>
> > Thanks,
>
> > Thiago
>
> > On Mon, Sep 6, 2010 at 17:42, Droid <rod...@gmail.com> wrote:
> > > Suggest dragging for x, y and tapping for z axis movement. But its not
> > > clear exactly what your end-game is....
> > > You could also use accelerometer for tipping (see Breakout Legend in
> > > the App in mkt)
>
> > > :) Droid
>
> > > On Sep 6, 7:04 pm, Thiago Lopes Rosa <thiago.r...@gmail.com> wrote:
> > > > Hi,
>
> > > > I have a cube on the center of the screen and the user can rotate it
> > > using
> > > > the touchscreen.
>
> > > > The problem:
> > > > For example, when I rotate the cube 180 degrees (vertical), the
> > > horizontal
> > > > rotation gets "inverted" (i mean, when moving right the cube rotates left
> > > > and vice-versa).
>
> > > > The issue is that I'm using 2D coordinates (touchscreen) to rotate the 3D
> > > > cube.
> > > > I'm always rotating around the cube's X and Y axis and never around the Z
> > > > axis.
>
> > > > The question is:
> > > > How do I calculate how much and which axis to rotate from a 2D coordinate
> > > > input?
>
> > > > Thanks,
>
> > > > Thiago
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscribe@googlegroups.com<android-developers%2Bunsubs cribe@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment