ZhouWeikuan / cocos2d

cocos2d for android, based on cocos2d-android-0.82, and now ported from cocos2d-iphone 0.99.4. The googlecode address is here: http://code.google.com/p/cocos2d-android-1/ . There are several demos to watch.
609 stars 291 forks source link

CCOrbitCamera does not rotate about central axis #26

Closed dustinanon closed 12 years ago

dustinanon commented 12 years ago

On my coworker's iPad (using cocos2d-iphone 0.99.4), CCOrbitCamera rotates horizontally about the Y-Axis and rotates vertically about the X-Axis, that is it rotates about the center both ways.

When I use CCOrbitCamera for Android, rotating horizontally always rotates about the left-hand side of the CCNode, and rotating vertically always rotates about the top side of the CCNode.

The code for CCOrbitCamera is a 1:1 translation between cocos2d-android and cocos2d-iphone, so I don't know where this bug is coming from.

As usual, thanks in advance!

ZhouWeikuan commented 12 years ago

It might live in cocos2d-android because CCorbigCamera is advanced feature, it uses grid and the related opengl is not always correctly translated/

2011/7/20 dustinanon < reply@reply.github.com>

On my coworker's iPad (using cocos2d-iphone 0.99.4), CCOrbitCamera rotates horizontally about the Y-Axis and rotates vertically about the X-Axis, that is it rotates about the center both ways.

When I use CCOrbitCamera for Android, rotating horizontally always rotates about the left-hand side of the CCNode, and rotating vertically always rotates about the top side of the CCNode.

The code for CCOrbitCamera is a 1:1 translation between cocos2d-android and cocos2d-iphone, so I don't know where this bug is coming from.

As usual, thanks in advance!

Reply to this email directly or view it on GitHub: https://github.com/ZhouWeikuan/cocos2d/issues/26

dustinanon commented 12 years ago

mmm, I see. I'm not too familiar with the OpenGL concepts, but I know that the camera values, and the values generated within CCOrbitCamera are exactly the same between android and iOS.

Do you happen to know where I might look for the OpenGL stuff?

ZhouWeikuan commented 12 years ago

OpenGL nehe? I just know this lessons, and also a newbie on OpenGL:-)

2011/7/21 dustinanon < reply@reply.github.com>

mmm, I see. I'm not too familiar with the OpenGL concepts, but I know that the camera values, and the values generated within CCOrbitCamera are exactly the same between android and iOS.

Do you happen to know where I might look for the OpenGL stuff?

Reply to this email directly or view it on GitHub: https://github.com/ZhouWeikuan/cocos2d/issues/26#issuecomment-1621311

dustinanon commented 12 years ago

Scratch all this. I'm an idiot. I had the anchor point set to (0,1)

-hangs head-