Scripts to add vertices to a line fixture

General discussion about the R.U.B.E editor
Post Reply
Nathan
Posts: 8
Joined: Sun Aug 28, 2016 10:13 pm

Scripts to add vertices to a line fixture

Post 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.
Nathan
Posts: 8
Joined: Sun Aug 28, 2016 10:13 pm

Re: Scripts to add vertices to a line fixture

Post 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.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Scripts to add vertices to a line fixture

Post by iforce2d »

Nathan
Posts: 8
Joined: Sun Aug 28, 2016 10:13 pm

Re: Scripts to add vertices to a line fixture

Post 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
Post Reply