x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.7
Tags:
more ▼

asked Jun 19 '15 at 11:29 PM in C++ Programming

avatar image

essex-ziva
6 1 1 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jun 25 '15 at 05:56 PM

avatar image

essex-ziva
6 1 1 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question