Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am attempting to create a Pool of Fixtures, in order to reduce memory consumption. My problem is that when I attempt to return a Fixture to the Pool and re-assign its position on the Parent Body, once it is repositioned the Fixture no longer provides any collision response with other world objects.

It seems that if you want to move a Fixture on a Static body, it needs to be destroyed and re-created. This method doesn't allow me to use my Pool however.

Does anyone know if it is possible to move a Fixture on a Static Body? I do not want to move the Body, but the Fixtures attached to it.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Farseer is open source.

http://farseerphysics.codeplex.com/SourceControl/changeset/view/94324#1436535

/// Warning: You cannot reuse fixtures.

If you still want to do this, then try to reproduce some of the steps that Fixture.RegisterFixture() private method does.

share|improve this answer
1  
You are right, there is no way around this without re-registering the fixture to the body. I ended up giving each fixture a body, and I am now able to reposition, however, I had to think of a smart way to reduce the number of active bodies on screen. Thanks. –  Jon Jan 1 '12 at 15:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.