Moving body

General discussion about the R.U.B.E editor
Post Reply
vkreal
Posts: 66
Joined: Sun Jan 13, 2013 7:29 pm

Moving body

Post 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!
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Moving body

Post 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.
Post Reply