Chain/loop export & moving fixtures
Posted: Mon Jul 15, 2013 10:06 pm
Hey there,
I have been playing around with R.U.B.E. for about a week now and really like it so far, even though the UI is a bit counterintuitive (or to put it charitably quite different from any similar tool I tried) sometimes.
There are two things however, which I'd deem "fix worthy":
The first one is the way (closed) loop/chain shapes are exported. If I export a line shape it looks like this:
Exactly waht you would expect. If change the same shape to a loop however, it looks like this:
I see several issues with this:
My second "issue" is with the placement of fixtures. It would be nice if the position of a fixture could be set via the properties dialog directly (as is possible for bodies). Either globally or relative to its body. Alternatively I'd like to enter the coordinates directly, when translating fixtures (the same way you can do it for the cursor). This is not really a problem, since I wrote my own moveToCursor script, but I still think it's odd, that this is not possible via the UI.
I have been playing around with R.U.B.E. for about a week now and really like it so far, even though the UI is a bit counterintuitive (or to put it charitably quite different from any similar tool I tried) sometimes.
There are two things however, which I'd deem "fix worthy":
The first one is the way (closed) loop/chain shapes are exported. If I export a line shape it looks like this:
Code: Select all
"chain" :
{
"vertices" :
{
"x" : [
-0.50,
-0.8454920053482056,
-1.404510021209717,
-1.404510021209717,
-0.8454909920692444,
],
"y" : [
0.0,
0.4755280017852783,
0.2938930094242096,
-0.2938930094242096,
-0.4755280017852783,
]
}
Code: Select all
"chain" :
{
"hasNextVertex" : true,
"hasPrevVertex" : true,
"nextVertex" :
{
"x" : -0.8454920053482056,
"y" : 0.4755280017852783
},
"prevVertex" :
{
"x" : -0.8454909920692444,
"y" : -0.4755280017852783
},
"vertices" :
{
"x" : [
-0.50,
-0.8454920053482056,
-1.404510021209717,
-1.404510021209717,
-0.8454909920692444,
-0.50
],
"y" : [
0.0,
0.4755280017852783,
0.2938930094242096,
-0.2938930094242096,
-0.4755280017852783,
0.0
]
}
- hasNextVertex, hasPrevVertex is superfluous, since I could just query for the existance of the nextVertex, prevVertex objects
- nextVertex, prevVertex also seems superfluous, since these points are implicitly given via the vertices array
- The same is true for the last vertice of the vertices array, which is not even needed in box2d, since the ChainShape.createChain(...) and ChainShape.createLoop(...) methods expect exactly the same vertices array (without the replicated last vertice)
My second "issue" is with the placement of fixtures. It would be nice if the position of a fixture could be set via the properties dialog directly (as is possible for bodies). Either globally or relative to its body. Alternatively I'd like to enter the coordinates directly, when translating fixtures (the same way you can do it for the cursor). This is not really a problem, since I wrote my own moveToCursor script, but I still think it's odd, that this is not possible via the UI.