Best practices of object design using Box2D and RUBE
Posted: Sat Aug 17, 2013 5:05 pm
Hello everyone,
I am fairly new to using Box2D and RUBE but I have a few questions about the actual designing of the objects in the world. The first is, are "objects" suppose to be made up of 1 body with multiple fixtures contained inside of it like how I thought originally or 1 body for every fixture that is a part of the "object". The reason why I am asking is because I thought the first way was how it is suppose to be and looking at examples it looks like its the other way around. Does it matter which way it is done? Any performance gains or loses?
Also, is there a z-order for the fixtures inside a body. It doesn't matter in the simulation really, its when applying images that it will be more important.
Thank you.
I am fairly new to using Box2D and RUBE but I have a few questions about the actual designing of the objects in the world. The first is, are "objects" suppose to be made up of 1 body with multiple fixtures contained inside of it like how I thought originally or 1 body for every fixture that is a part of the "object". The reason why I am asking is because I thought the first way was how it is suppose to be and looking at examples it looks like its the other way around. Does it matter which way it is done? Any performance gains or loses?
Also, is there a z-order for the fixtures inside a body. It doesn't matter in the simulation really, its when applying images that it will be more important.
Thank you.