Reputation
Next privilege 125 Rep.
Vote down
Badges
9
Impact
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 4 votes cast
Feb
22
awarded  Popular Question
Sep
7
awarded  Commentator
Sep
7
comment IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
I would pass this on to the devs of Farseer so they can create a bug report and/or look into it
May
9
comment Can I swap out Farseer physics fixtures at runtime?
@JonathanHobbs Good point, I'm not sure if the objects actually get removed from the fixture list until the next world step or not, Would have to test
Feb
3
awarded  Benefactor
Feb
3
comment IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
I stated that the error happened on the line World.Step was called, not in my code. I have stepped through my code in the debugger, and everything is fine. I also noted that I tried the same code without disabling the bodies, and the error wasn't present.
Jan
30
accepted IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
Jan
30
comment IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
I tried your suggestion with a newer, updated version of my above code - only disabling the body after accessing any attributes needed - and it worked. The updated code places the bodies in different collision groups. If I try the same thing without them, the error occurs. The IndexOutOfRangeException probably refers to the world's ContactList changing length because the bodies were colliding when disabled - where setting a different collision group on the body first appears to fix the problem.
Jan
30
revised IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
Added update
Jan
30
awarded  Promoter
Jan
30
revised IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
Changed title
Jan
25
awarded  Scholar
Jan
25
comment Can I swap out Farseer physics fixtures at runtime?
Your answer has taken me the farthest for this question, so marking it as accepted.
Jan
25
accepted Can I swap out Farseer physics fixtures at runtime?
Jan
25
comment IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
@Jon Yes, it gets called within the call to base.SetState, and also when the bodies are initially created and set to .Enabled = false;.
Jan
24
revised Can I swap out Farseer physics fixtures at runtime?
Linked to new question
Jan
24
asked IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?
Jan
24
awarded  Supporter
Jan
24
awarded  Editor
Jan
24
revised Can I swap out Farseer physics fixtures at runtime?
Added solution attempt