How do I update the shadow frustum?
The bounds and shadow frustum for my custom mesh components never update when my mesh updates. How do I fix this?
I'm using a modified version of the ProceduralMeshComponent from https://wiki.unrealengine.com/Procedural_Mesh_Generation to generate my meshes on the fly. The only significant modification I've made to that code is to update just positions, not the index buffer, when the mesh moves. I'm calling MarkRenderDynamicDataDirty every time I change anything. I doubt it's significant, but I've also stripped out all of the collision/physics components.
I've overridden UMeshComponent::CalcBounds, which I thought would be sufficient, but this function only ever gets called once at the beginning. Is there something I have to call to let the system know the bounds have changed?
asked Jun 19 '15 at 11:29 PM in C++ Programming
I needed to call UpdateComponentToWorld() whenever my object's bounds changed. This function's name and documentation make it sound irrelevant. However, CableComponent.cpp calls this function every simulation tick with a comment in the code saying that it's called because the bounds were changed. Adding a call to this every time I MarkRenderDynamicDataDirty() makes everything behave as desired.
answered Jun 25 '15 at 05:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here