Hi guys,
Say I have a box2d body of a snake and a target to which I want it to crawl. On its way it can bump into other bodies.
What do you think would be the right algorithm to pull the snake?
Somehow setLinearVelocity? or should I better use a pulley of some sort?
Thanks
Comments
Likes: RogerT
b2.Body:applyForce(forcex, forcey, pointx, pointy)
Likes: RogerT
Likes: RogerT
http://appcodingeasy.com/Gideros-Mobile/Dragging-Box2d-object-in-Gideros-Mobile
You'd see that dragging in box2d is created through mouse joints (specifically setting target to touch coordinates)
I wonder if same mouse joint could be used for this purpose, to set target coordinates that you need, you can also adjust frequency to get the feel/speed you need
Likes: atilim, RogerT