GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2012-Sep-02

Title: Polyvector
Post by: MrPlow on 2012-Sep-02
Hi,

Can someone help explain a Polyvector and how to draw a basic shape like a rock..(5 - 6 sided object)
Plus how the collision detection would work for such a shape...

It would help me a lot! :nw:
Title: Re: Polyvector
Post by: hardyx on 2012-Sep-02
Polyvector allows to draw a polygon object. You must to use STARTPOLY and then the vertices with the order POLYVECTOR, and ENDPOLY to finish the polygon. The polygon is composed of triangles, ordered depending the imode. In the POLYVECTOR order you specify the x,y of the vertex and the RGB colour you want to draw the vertex. You can adjust a sprite (texture) to the polygon area, this is the index parameter of the STARTPOLY; or you can draw a coloured polygon with -1.

http://www.glbasic.com/xmlhelp.php?lang=en&id=67&action=view
http://www.glbasic.com/xmlhelp.php?lang=en&id=66&action=view
Title: Re: Polyvector
Post by: MrPlow on 2012-Sep-02
Thanks a lot ....

I think i get it now...finally...