rgsv we can`t change assets of done projets so we cant use 4.1
OK, I just wanted to be sure. 🙂
If the assert really fails there, percentSpacing
must be true!
This code is quite tricky, as there are many variables that change the sizes. You may be able to apply a hack without needing to fully understand all of the many code paths. For example, maybe size _spaces
to be larger than necessary:
_spaces.setSize(spacesCount + 1, 0); // + 1 was added
That is probably not technically correct, but it may stop the crash. You'll need to check if the path constraint is applied properly in your application when it otherwise would have crashed.
Your code is inside if (!path.isConstantSpeed()) {
. You could try enabling constant speed for the path. That will use different code to apply the path constraint and may avoid the crash. It is the default and I think most people use constant speed, so that code path may have fewer bugs.
rgsv We are put console output in begin of function and see that _spaces size is correct and spacesCount less than _spaces size value
If these things are true, it should not be possible to crash. Maybe there is a buffer overrun somewhere. Are you using multiple threads? If two threads try to call PathConstraint computeWorldPositions
at the same time, it could cause a problem like you see.