Page 1 of 1

Scripts to add vertices to a line fixture

Posted: Thu Feb 16, 2017 5:48 pm
by Nathan
Hi there,

I'm just creating levels for my game atm, this is a typical example: http://imgur.com/a/aI8kw.
I'm just curious how long it would take you to make a fixture like this? Because it took me a good 30 mins tracing a arc image and then using bezier/smooth functions provided in rube.

Do you have any tips that could speed up level creation? Maybe a script to add vertices using trig functions.
Thanks again for the rube software, making quite a lot of progress with libgdx.

Re: Scripts to add vertices to a line fixture

Posted: Thu Feb 16, 2017 8:21 pm
by Nathan
I've only just started looking into angelscript after using RUBE for months.... managed to get the following done http://imgur.com/a/hJmlE (I know it is poorly written). I'm going to keep playing with different math functions, not sure of the best way to create loops still. Any tips would be appreciated.

Re: Scripts to add vertices to a line fixture

Posted: Sat Feb 18, 2017 12:49 am
by iforce2d

Re: Scripts to add vertices to a line fixture

Posted: Sat Feb 18, 2017 2:13 am
by iforce2d

Re: Scripts to add vertices to a line fixture

Posted: Sat Feb 18, 2017 3:44 pm
by Nathan
Initially I traced a semi circle by manually adding vertices, and then through a combination of using smooth/bezier functions, I somehow squashed it tho. It was meant to be a semi circle, as displayed in your video, so that's perfect. Through a combination of that script and joining fixtures together, my level generation should be much easier! I appreciate the time you took to help me out