Polygon question

Hey guys I was wondering if anyone could help me on this.

If I’ve draw a polygon (lets say, a square) and set its vertices, is there any way to edit them?

I can’t seem to figure this out from the documentation available.

According to this thread, you can’t edit the vertices after the creation of the polygon. You could just create/destroy polygons in a loop as you modify the values of the vertices as needed. 

Yeah i saw that thread but then wondered how some of the mode 7 effects have been achieved in corona then

The Mode 7 stuff isn’t alerting polygon vertices. It’s using perspective on a regular rectangle. See our sample app on Perspective:

https://github.com/coronalabs/samples-coronasdk/tree/master/Graphics/Perspective

Rob

Yeah i know that but i was wondering how youd change those rectangles as the perspective changed (i.e the camera rotated, moved forward etc)

According to this thread, you can’t edit the vertices after the creation of the polygon. You could just create/destroy polygons in a loop as you modify the values of the vertices as needed. 

Yeah i saw that thread but then wondered how some of the mode 7 effects have been achieved in corona then

The Mode 7 stuff isn’t alerting polygon vertices. It’s using perspective on a regular rectangle. See our sample app on Perspective:

https://github.com/coronalabs/samples-coronasdk/tree/master/Graphics/Perspective

Rob

Yeah i know that but i was wondering how youd change those rectangles as the perspective changed (i.e the camera rotated, moved forward etc)