This project has moved and is read-only. For the latest updates, please go here.

Completely cloning fixtures

Topics: Developer Forum
Jan 3, 2011 at 9:45 AM

Alright so we're working on a small multiplayer racing game, so obviously we're working on Player Prediction (rewinding and replaying main actor's commands to predict where he should be now to "eliminate" lag).

Now in order for this to work properly, I need a way to completely clone a fixture, body, etc with all the parameters into a buffer fixture.

How can this be done?

Jan 7, 2011 at 12:05 AM

A fixture holds a shape and a body. In order to clone a fixture, you will have to clone the body and shape too. That becomes even more complex if you need to clone attached joints and contacts too.

Do you need the body attached to the fixture or can you do without and only use the shape?