hiteshsuthar / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Triangle polygon attached to sprite only showing as a square #115

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Add 2 polygons, 1 as a PolySprite and one as a sprite with a polygon attached 
(no texture)

Polygon polygon = new Polygon(new float[] {0, 0, 0, 1, 1,0});
polySprite1 = new PolygonSprite(polygon, 2, 2, 1, 1);
polySprite1.setBorder(0, 0, 0, 1);
polySprite1.setRGBA(1, 0, 0 , 1);
add(1, polySprite1);        

Polygon polygon2 = new Polygon(new float[] {0, 0, 0, 1, 1,0});
sprite = new Sprite(1, 1, 1f, 1f) ; 
//sprite.setTexture(Textures.playerstraight);
sprite.setPolygon(polygon2);
sprite.setBorder(0, 0, 0, 1);
sprite.setRGBA(0, 1, 0 , 1);
add(1, sprite);

What is the expected output?
2 triangle polygons.

What do you see instead?
PolygonSprite as a triangle as expected, but a square box for the sprite (with 
attached polygon)

What version of Rokon are you using?
2.0.3.

On which version of Android are you experiencing this?
2.1 updated

Please provide any additional information below.
The polygon data for the sprite is actually there as MathHelper.intersects is 
able to calculate the 2 intersecting triangles correctly, it's just the display 
of the polygon isn't correct. 

Original issue reported on code.google.com by paul.law...@gmail.com on 12 Jul 2010 at 9:55

GoogleCodeExporter commented 8 years ago
Ths still not work? 

Original comment by rtaylor205@gmail.com on 25 Jul 2010 at 9:19

GoogleCodeExporter commented 8 years ago
Just tested with trunk 361 and the problem is still there.

Original comment by paul.law...@gmail.com on 28 Jul 2010 at 8:34