Hello, first off: Thank you so much for this great 2d physics engine! It's so easy to use that even I can use it (which says a lot, lol)!
On to the questions... (sorry for the long post)
1. As I started to create my little ragdoll class and its associated graphics class I ran into a little problem I'm having a hard time solving. The ragdoll class works great and the bodies (the actual ragdolls) move around really neat in the world. However, it just felt natural to me that characters that were alive would not be part of the physics to the same extent as the ragdolls, due to animation, until they were actually dead. I've got a method to create a ragdoll from a "live character" and move the ragdoll to that position, however I don't know how to make the limbs (joints) have the same angle as the corresponding live body. I know that I could place the body parts and joints in the correct rotations and positions accordingly but that requires a lot of thinking and coding (and math, sigh) - I just want to know if there's a less complicated way to go about this.
I've been thinking of setting the limit of the joint temporarily to the desired angle and setting a high speed and torque towards that angle and updating just once, but I don't know how to set the limits back to normal when they're actual joints in the world.
2. Simple question, just to make sure, the group index has a limit of +/- ~32767? I mean, the variable type is int16... so I thought it would but I don't know exactly how group index is handled within box2d (besides what is written in the manual).
Thank you beforehand.
On to the questions... (sorry for the long post)
1. As I started to create my little ragdoll class and its associated graphics class I ran into a little problem I'm having a hard time solving. The ragdoll class works great and the bodies (the actual ragdolls) move around really neat in the world. However, it just felt natural to me that characters that were alive would not be part of the physics to the same extent as the ragdolls, due to animation, until they were actually dead. I've got a method to create a ragdoll from a "live character" and move the ragdoll to that position, however I don't know how to make the limbs (joints) have the same angle as the corresponding live body. I know that I could place the body parts and joints in the correct rotations and positions accordingly but that requires a lot of thinking and coding (and math, sigh) - I just want to know if there's a less complicated way to go about this.
I've been thinking of setting the limit of the joint temporarily to the desired angle and setting a high speed and torque towards that angle and updating just once, but I don't know how to set the limits back to normal when they're actual joints in the world.
2. Simple question, just to make sure, the group index has a limit of +/- ~32767? I mean, the variable type is int16... so I thought it would but I don't know exactly how group index is handled within box2d (besides what is written in the manual).
Thank you beforehand.