I have been having a constant issue with physbones that has plagued so many of my avatars in the past and it has all been due to the way that Physbones operates.
Physbones move based on the movement of their root bone, which in practice, is good,
however
, not all physbone chains should operate in this fashion. Hair, tails, and cloth makes sense this way, but not things such as ears, chest, and necklaces.
This is
partially
solved currently by enabling the
Inertia (World)
setting and moving it all the way to
1.0
, however this completely prevents the adjustment of
local
intertia, and also will disable avatar movement in the world from affecting the Physbones at all.
The feature I am requesting is to have a toggle or slider to control the behavior of the Physbone, from relying on velocity to instead rely on acceleration. This will transfer the acceleration of the root across the physbone, as opposed to transferring the velocity.
As a result, the physbone will remain in its resting state regardless of if the avatar is in motion or not, preventing things such as the chest constantly clipping into the body of the avatar or floating when moving, but also allowing it to move when jumping or when changing the movement input.
This will be due to how the acceleration is 0 when moving at the same velocity.
The application of such a feature is suggested by modifying the Velocity and Position values of Physbones to allow for acceleration to propagate into the Physbone chain and remove the impact that velocity has based on a Drag factor.
Example pseudo-implementation:
// Keep track of global movement of Physbone by computing the displacement from one timestep to the next
CurrentPositionDifference = CurrentRootPosition - LastRootPosition;
Displacement = CurrentPositionDifference - LastPositionDifference;
// If there is no Drag, then the Physbone does not react to the Air
// This means that the Physbone's displacement is no longer free-floating
// As a result, the free-floating position must be cancelled (non-destructively), and the immediate displacement added
PhysbonePosition += (PositionDifference - Displacement) * (1.0f - Drag);
// Calculate spring physics like normal, incorporating the change in velocity
PhysboneVelocity += SpringPhysics(Physbone) * deltaTime;
This will allow most Physbones to continue to flow freely through the air as normal, but specific physbones that are more rigidly 'Attached' to their parents will behave much more realistically as opposed to constantly having movement forces applied to them.
This could also be named via a
Wind
or
Air Drag
factor, as it is presumed that flowing items react to air in a way that would cause it to experience those forces, whereas something like the chest would not.
Attached is an example video showing the difference