1

I'm wondering what I should do for my player character. Currently he has the idle stance, with all the collision polygons created etc. But I want him to move his arm polygon when he is punching. How would I do this? I have all the polygons statically coded in the game.

I'm coding in Java, but the code can be translated.

Martijn Courteaux
  • 67,591
  • 47
  • 198
  • 287
liamzebedee
  • 14,010
  • 21
  • 72
  • 118

1 Answers1

1

You should create his arms as two new bodies and connect them to the character body using a revolute joint (per arm). And when he punches, enable the motor of the joint to make the arm move up.

Martijn Courteaux
  • 67,591
  • 47
  • 198
  • 287