Fix SoftBody
- update rendering server once per frame.
#108229
Draft
+172
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also add selectable pinned point process mode.
Discussion
This is some heavily work in progress (i.e. contains
DEV_ASSERT(0)
😀 ) stuff for fixing theSoftBody
problems introduced in #106863 .Hopefully one of the
SoftBody
interested guys will take this all over as I'm keen to avoid any responsibilities in this area.The difference between USER callbacks and engine callbacks.
I.e.
PHYSICS_PROCESS
andINTERNAL_PHYSICS_PROCESS
,PROCESS
versusPRE_FRAME_DRAW
.Users are restricted to calling things at certain times, engine developers on the other hand can use internal callbacks that can be assured to be after or before all user interactions. This is because a user might for example, move a bone, pin or whatever during a physics tick, or process, and we want to have rendering / physics react to that. (Users can use
process priority
, but the engine itself tends to separate user and internal into different phases).This is commonly called "order of operations" and can cause a number of bugs, because moving one operation somewhere else can change the relative order, and create regressions elsewhere. This is notorious for causing problems, when a contributor is not aware of knock on effects.
Due to the chicken / egg effect, sometimes there is no option but to add a frame of delay.
Key things to note:
Notes