Log in or register to post comments

How can I make the rotation appear relative to the user’s point of view?

May 22, 2012 - 2:58pm #1

I need to make the rotation appear relative to the user’s point of view.

I've found and tutorial online but I don't know how to apply it to the ImageTargets sample for iOS.

learnopengles.com/rotating-an-object-with-touch-events/

Can anybody help me out?

Best
Juan

Re: How can I make the rotation appear relative to the user’s po

May 22, 2012 - 8:36pm #3

Thanks for your interest, DavidBeard!

I can't seem to paste the whole URL but I think you'll be able to access from the one I now put in the thread.
I have no problem rotating objects on their own center, I just need to avoid rotation to change the object's axis positions.
With the ImageTargets sample I've been able to rotate different objects without a problem, but as soon as I rotate in one direction, for example in the X axis by 90 degrees, the Y axis takes the position of the Z axis, and I want to achieve something different.
Basically I want to add touch gestures in a way that a vertical swipe rotates the object vertically and a horizontal one horizontally.
The URL provides directions to EXACTLY where I want to get to, I just don't know how to apply their code to de ImageTargets sample for iOS.

Best
Juan

Re: How can I make the rotation appear relative to the user’s po

May 22, 2012 - 4:32pm #2

That link isn't working. Are you trying to get the object to rotate on its own center?

Log in or register to post comments