Page 1 of 1

Moving body

Posted: Mon Sep 02, 2013 5:18 am
by vkreal
I am trying to figure best way to move body (say a vehicle) to different location set from RUBE editor. I can think of two ways

1. change x,y coords in RUBE json before loading into box2d (prob not best option)
2. load box2d and move one of the vehicle body(assuming vehicle contains multiple bodies)? I am not sure best practice to achieve this

Any hints will be greatly appreciated!

Thanks!

Re: Moving body

Posted: Mon Sep 02, 2013 10:06 am
by iforce2d
If there are multiple bodies with joints connecting them, you would need to move all those bodies by the same distance to prevent the joints from going crazy.