Here is my code.
Code: Select all
int i = selectedEntity.body.getFixtureCount() - 1;
Link temp = (Link)selectedEntity.body.getFixture(i).getShape();
Link newLink = new Link( start , end );
I get the last point. Then I set it to a vector2 start then my end point which is the mouse location I set to vector2 end. I made sure to add the previous link. Then I add it to the body.
This will add a new segment starting from the last point but each time I add another the previous segment will disappear. What part of the dots am I not connecting here ?