0
votes

I have a condition in which i have to continuously move box2d body.

I can guess two ways to move box2d body.

  • first, what can i do in transformed box2d body to new position
  • Second way is, I delete the previous body and recreate new one at new position.

Now, I want to know, which is the best way to do this? And also eager to here other way if possible.

1

1 Answers

0
votes

Move the body. Reset the velocities if needed.

Deleting and recreating the body would work, but it would completely reset the body's state and you'd have to create the fixtures and shapes again too. That's overkill.