How to merge two fixtures?
How to merge two fixtures?
So theres a button in the "fixture" menu that allows you to join two fixtures together but its always greyed out no matter what I do. How do I ungrey it?
Re: How to merge two fixtures?
Thanks for the quick response!
Also this may be specific to LibGDX but is there any way to not automatically add the bodies to the world upon loading it as a scene using RubeLoader? I'm making a game where theres lots of different obstacles (barricades, barrels, cars etc) that I need to randomly create, so I use Box2DUtils to duplicate the body in the rube scene but the problem is that when I load the scene it automatically adds the actual scene (which is just one copy of all the different obstacles arranged next to eachother) to the world.
EDIT: What I'm currently doing is moving the bodies the scene creates waaay off screen, ie
This is obviously a very bad, hacky solution though. Any alternatives?
Also this may be specific to LibGDX but is there any way to not automatically add the bodies to the world upon loading it as a scene using RubeLoader? I'm making a game where theres lots of different obstacles (barricades, barrels, cars etc) that I need to randomly create, so I use Box2DUtils to duplicate the body in the rube scene but the problem is that when I load the scene it automatically adds the actual scene (which is just one copy of all the different obstacles arranged next to eachother) to the world.
EDIT: What I'm currently doing is moving the bodies the scene creates waaay off screen, ie
Code: Select all
for (int i = 0; i < scene.getBodies().size; i++) {
scene.getBodies().get(i).setTransform(1000 + 10*i, 1000 + 10*i, 0);
}
Re: How to merge two fixtures?
Maybe you would find it easier to load the obstacles from separate .json files
viewtopic.php?f=6&t=254
Let me know if none of that is useful. There would be a small time delay incurred when loading like that though - if it turned out to be a problem, the way you are doing it now might actually be the best.
viewtopic.php?f=6&t=254
Let me know if none of that is useful. There would be a small time delay incurred when loading like that though - if it turned out to be a problem, the way you are doing it now might actually be the best.