Search found 54 matches
- Sun Jul 26, 2015 4:11 pm
- Forum: R.U.B.E discussion
- Topic: Drawing bodies and fixtures
- Replies: 17
- Views: 30759
Re: Drawing bodies and fixtures
Aha ! Wait. I think I have it. What you're saying is I *should* attach an image and position it over the fixture in order to then read that at load time and get the relative position to the body center. Even if I dont actually use the same image in game. And I need to do that because the "virtu...
- Sun Jul 26, 2015 1:54 pm
- Forum: R.U.B.E discussion
- Topic: Drawing bodies and fixtures
- Replies: 17
- Views: 30759
Re: Drawing bodies and fixtures
Thanks but this hasn't really addressed the question *I think* :D fixture2 in the diagram (in rube editing) maps to multiple fixtures in box2d. The position of the image for that fixture (if I were to bother to add one which I did here for clarity) in rube is one thing but at runtime when the box2d ...
- Sun Jul 26, 2015 12:59 pm
- Forum: R.U.B.E discussion
- Topic: Drawing bodies and fixtures
- Replies: 17
- Views: 30759
Drawing bodies and fixtures
Rube does a nice job of pretending there is only one fixture for a complex shape. But when we load Rube obviously there are many fixtures created in box2d whose total make the complex fixture we see in RUBE. But whats the best way to work out where to draw my sprite/texture and at what angle for tha...
- Fri Jul 24, 2015 6:25 pm
- Forum: R.U.B.E discussion
- Topic: Creating separate objects in RUBE
- Replies: 13
- Views: 24197
Re: Creating separate objects in RUBE
Please keep posting any updates. This is almost exactly what I want with the addition of the ability to replicate rube objects for multiple "in game" objects. Alas one cant use the B2dJson loader as the JBox2d classes are incompatible with the LibGDX B2d wrappers. See the thread here https...
- Fri Jul 24, 2015 6:11 pm
- Forum: R.U.B.E discussion
- Topic: Using a RUBE scene as a body/fixture library
- Replies: 8
- Views: 16717
Re: Using a RUBE scene as a body/fixture library
No. Take the rubeloader out of the equation. The LibGDX classes are not compatible with the JBox2d ones used in the B2DJson loader.
- Fri Jul 24, 2015 5:41 pm
- Forum: R.U.B.E discussion
- Topic: Using a RUBE scene as a body/fixture library
- Replies: 8
- Views: 16717
Re: Using a RUBE scene as a body/fixture library
Well, I tried but it ended up fruitless. The JBox2d types are incompatible with the libgdx wrapper classes. So using this b2djson loader is a no go. Unless someone with more experience than I have can point me in a better direction. :( So this means I'll have to try and implement my own replication ...
- Fri Jul 24, 2015 4:40 pm
- Forum: R.U.B.E discussion
- Topic: Using a RUBE scene as a body/fixture library
- Replies: 8
- Views: 16717
Re: Using a RUBE scene as a body/fixture library
I handle images myself using texture packer and sprites which I map back to the b2d bodies and fixtures so thats not an issue. I re-edited my response above - it's a type issue I think. I'll have another crack at using it though but I'm no Java maven and soon come unstuck when different libraries st...
- Fri Jul 24, 2015 4:31 pm
- Forum: R.U.B.E discussion
- Topic: Using a RUBE scene as a body/fixture library
- Replies: 8
- Views: 16717
Re: Using a RUBE scene as a body/fixture library
The libgdx guys recommened I stayed away from that but I'm not sure why. I guess I'll have to try and integrate the b2djson loader into intellij. Oh .. I think its because your loader uses jbox2d whereas libgdx does its own box2d wrapper and so the types clash. Anyone reading this used this loader s...
- Fri Jul 24, 2015 2:45 pm
- Forum: R.U.B.E discussion
- Topic: Using a RUBE scene as a body/fixture library
- Replies: 8
- Views: 16717
Using a RUBE scene as a body/fixture library
Looking for advice/pointers/war stories about the best way to utilise RUBE to hold body, fixture information where I can then duplicate that in my run time. I guess one obvious way is to create a body and mark it as inactive so its not part of the world. I can retrieve all information with getNamed(...
- Fri Jul 24, 2015 12:24 pm
- Forum: R.U.B.E discussion
- Topic: LibGDX and RUBE : body position.
- Replies: 2
- Views: 8873
Re: LibGDX and RUBE : body position.
Immediately after. But, preparing a simple example thus: RubeSceneLoader loader = new RubeSceneLoader(); rubeScene = loader.loadScene(Gdx.files.internal(GameLevel.getResourceName(rubeName))); Body b2d = rubeScene.getNamed(Body.class, "bee1").first(); Gdx.app.log("rube", String.va...