Weird Hairworks frustum culling bug

Has anyone else that uses hairworks had this problem? My hairworks component is a child of the characters skeletal mesh. When the character plays no animation then culling works as it should. But if an animation plays that moves the character in any direction then it seems that the engine is using the original location of the hair for the bounds location.

So the hair moves but the bounding box doesn’t move with it, resulting in the hair culling when it should not!

What’s weird is that if I get the bounds location and extents, and use “draw debug box” to show me where it is, it is following the animation… but my tests show me that it is not. This made me think that Hairworks is using something else for the bounds.

So I looked at the Hairworks source and it looks to me like it is calculating the bounds in there, and “overriding” the normal bounds that unreal uses for objects and this could be a bug where it’s not taking into account the animation… I could be very wrong though haha.

I’ve tried turning on “use attach parent bounds” but the hair actually stops moving with the character altogether… I also disabled frustum culling inside the hairworks asset and increasing the bounds scale. I even tried making a simple change to the hairworks source code to increase the size of the bounds being generated but had some major compile problems even if I just enter a blank line in between the code :confused:

Surely a bug like this can’t exist in hairworks? I must be doing something wrong but have gone over all the documentation and I’m well and truly stuck!

Well I’ve been experimenting and I think I’ve found the source of the problem. In my animation blueprint I am using the “Transform Bone” To apply a vector offset to the hip bone. The bounds position is not updating when this variable changes.

For example, if the hip offset vector changes from 0,0,0, to 0,0,-100 then the character and the hair moves down by 100, however the offset is not making any difference to the bounds which remains in it’s original location and causes the hair to be culled when it should not. I have no idea why this would happen though :frowning:

What’s even stranger is if I set the vector to be 0,0,-100 by default, instead of setting it during runtime, then it works perfectly.

Why does hairworks disappear from the lens when the animation is played?