Jump to content

RagDoll Update Lag


Recommended Posts

Hello,

 

Similar to the issue I reported with attachments lagging behind the mesh's update.

 

BodyRagDoll bodies and shapes lag behind the transform of the mesh that is animated.

 

You can see this effect clearly by looking at the provided Ragdoll_07 sample. Zoom in nice and close to a running model, and stare at the head shape (enable show shapes in the Tools in editor mode), and its relationship to the head. You'll notice that it consistently lags behind the bobbing of the head mesh.

 

The solution to this for attachments was to use WorldBoneTransform, however I do not see a similar solution to the RagDoll form of the problem.

 

Would love to see this fixed.

Link to comment

The problem may consist in the order of engine performing the update. WorldTransformBone helped because:

  1. First of all, script update() is processed. Here you set transformation to the attachment as the skinned animation specifies. But the animation for the current frame has not yet been actually updated!
  2. Then the world nodes are updated:

    1. The skinned mesh animation is played, detaching the sword from the hand.
    2. WorldTransformBone is updated returning them back together.

May be you should try out another approach:

  1. Set per-frame bone transformations in the update manually
  2. Then set the returned transformation to the sword

 

BodyRagDoll bodies and shapes lag behind the transform of the mesh that is animated.

Physics is calculated with its own FPS which is usually lower than the rendering FPS.

Link to comment

May be you should try out another approach:

  1. Set per-frame bone transformations in the update manually
  2. Then set the returned transformation to the sword

 

1) This is already done as a part of my IK solution. All bone transformations are set each frame.

 

2) Setting the bone transformation to the sword body, does not work (see other forum post regarding ragdoll setVelocityTransform). Either it involves a more complex transform than simply copying the bone transform, OR, I've set up my ragdoll incorrectly to make it so difficult. Though, my ragdoll setup is the only way I've found to get the shapes to match up with the mesh.

Link to comment
×
×
  • Create New...