sourcemars / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

Grid Effect (Liquid) works differently in Android than it does in iOS #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a new Sprite with an image.
2. Create a new CCLiquid effect.
3. Run the action for the Sprite created in step one. (I set it to 
RepeatForever).

What is the expected output? What do you see instead?

Expected output: The four points which represent the corners of the sprite 
remain locked as the vertices within the interior of the sprite are animated as 
in iOS.  This prevents the edges from being interpolated during the effect.

What I see instead:  The bottom-left, top-left, and bottom-right corners are 
remaining locked, but the top-right corner is not locked which causes an 
undesired interpolation of the right edge of the sprite.

What version of the product are you using? On what operating system?
I'm on the latest version of cocos, and I'm testing on Android 3.0 OS right now.

Please provide any additional information below.

I believe I have found the root of the problem, but I have been unable to 
decipher the code well enough to correct the problem.  It seems that in iOS 
when the grid's points are mapped to their respective vertices on the sprite 
the corners are never mapped to the grid and thus never changes (see Image One 
for a visual reference).  However in Android when the grid points are mapped to 
their respective vertices only three corners remain unmapped and the top right 
corner (max x, max y) does get mapped (See Image Two).  I think the issue could 
be resolved by someone who really understands the calculateVertexPoints() 
method in CCGrid3D.  

I would really appreciate any help working on this as I really need to find a 
fix soon for the project that I'm currently working on with cocos for android.

Original issue reported on code.google.com by EMan8...@gmail.com on 12 Dec 2011 at 6:16

Attachments: