Search found 861 matches

by iforce2d
Sun Dec 30, 2012 5:45 am
Forum: Box2D tutorial discussion
Topic: Jump with Prismatic Joint?
Replies: 1
Views: 7359

Re: Jump with Prismatic Joint?

I had initially been thinking to do that, but I'm not so sure it's worth a whole tutorial. Maybe this thread will suffice :) Basically you have a main (fixed rotation) body for your character, and a second body attached with a prismatic joint to function as a 'piston'. Setting the speed and max forc...
by iforce2d
Sun Dec 30, 2012 5:17 am
Forum: R.U.B.E discussion
Topic: Create path for Kinematics bodies.
Replies: 6
Views: 14659

Re: Create path for Kinematics bodies.

Yeah, I was thinking about that yesterday. For the first update there will be int, float, string, vec2 and bool properties available. You could use a string to specify a body by name with this. Perhaps in future an expansion could be made to allow properties that are a reference to some other item i...
by iforce2d
Sun Dec 30, 2012 5:14 am
Forum: Box2D tutorial discussion
Topic: Flip a character
Replies: 4
Views: 14021

Re: Flip a character

Unfortunately those stack exchange answers are correct. Box2D offers no method for dynamically changing shapes on fixtures, let alone an entire structure of bodies with joints. Since there is no third dimension to gradually rotate the bodies through, what you are talking about is essentially a telep...
by iforce2d
Sat Dec 29, 2012 6:05 pm
Forum: R.U.B.E discussion
Topic: Unique body names
Replies: 3
Views: 10215

Re: Unique body names

I think that would require separate properties to manage efficiently. Some people (myself included) have used a system whereby you give things names like "foo=12;bar=34" and parse this after loading, but it's not an ideal solution. The custom properties I am working on right now will allow...
by iforce2d
Sat Dec 29, 2012 2:20 pm
Forum: R.U.B.E discussion
Topic: Create path for Kinematics bodies.
Replies: 6
Views: 14659

Re: Create path for Kinematics bodies.

Good point, these comments may or may not be desired in the final output. I think there will need to be some options added, so the user can choose which data goes into the final json. Yes, custom properties will make things like that possible. If you also used properties to store the next node in th...
by iforce2d
Sat Dec 29, 2012 2:14 pm
Forum: R.U.B.E discussion
Topic: Unique body names
Replies: 3
Views: 10215

Re: Unique body names

This is so you can make groups of items. For example you might have a game level with some items that should all be given a certain behavior, eg. maybe trees should wave in the wind. You can select them all and give them the same name, and get them all in a list after loading. If you had to give the...
by iforce2d
Fri Dec 28, 2012 6:24 pm
Forum: Box2D tutorial discussion
Topic: sorry,i am late!
Replies: 4
Views: 12480

Re: sorry,i am late!

Hello qq! :)
The forum is new, so you are not late ;)
by iforce2d
Thu Dec 27, 2012 8:37 am
Forum: R.U.B.E discussion
Topic: Create path for Kinematics bodies.
Replies: 6
Views: 14659

Re: Create path for Kinematics bodies.

There is no specific feature for this at the moment, but there are a couple of ways you could get a similar effect. The simplest would be to place some bodies around the scene with names that identify their position in the sequence, as in the 'rocket platform' demo (http://www.youtube.com/watch?v=vY...
by iforce2d
Wed Dec 26, 2012 6:00 pm
Forum: R.U.B.E discussion
Topic: Get body by name
Replies: 12
Views: 35187

Re: Get body by name

Currently the json file is always an entire world. It sounds like you want to have your player ragdoll defined separately to the level file so that you can load it at any time later, or load the same ragdoll into different levels without having to actually save it as part of each level? The concept ...
by iforce2d
Wed Dec 26, 2012 12:47 am
Forum: R.U.B.E discussion
Topic: Get body by name
Replies: 12
Views: 35187

Re: Get body by name

Hi Oscar The C++ code export uses the standard 'dump' feature that is in the Box2D source code, so it only recreates the Box2D world itself, and does not know about any of the extra metadata related to each body/fixture etc. To store all the related information for the items requires a much larger s...