PDA

View Full Version : How to draw a poly


su37
03-02-2006, 08:35 AM
I have a question,

How to draw a poly, drag mouse, Pass two points .

TheGameMaker
03-03-2006, 06:04 PM
could u eventually discrpe your problem more eyactly???

su37
03-04-2006, 01:09 AM
Sorry, my english is poor

My mean is I want to draw a poly like draw rectangle

TheGameMaker
03-04-2006, 07:19 PM
i think my english is mutch more worse than yours...:D

iŽll have a look about it....
TGM

TheGameMaker
03-04-2006, 07:31 PM
Ok, u have to use the "mouse tool" declared as following:


tool draw_polys
(
on mousePoint button do
(
if button==1 then --left klicked??
(

)
)
)

and then use the "gridPoint" command for getting the position of the mouse klick, safing it into a variable, wait for the next klick, generate the mixed points, i mean p3 = [p1.x, p2.y] p4 = [p2.x, p1.y] or something like this....

then create a quadpoly between this resulting 4 points with the
polyOp.createPolygon <Poly poly> <vertex array>
command

hope this helps
TGM

CGTalk Moderation
03-04-2006, 07:31 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.