Interpolating rotation causing a crash? (Video)
While testing some new stuff in-game{In html5 preview and arcade}, I kept consistently getting crashes when an enemy used interpolate set beyond 360.
It was a new "spin" gimmick when hit with an attack with "high impact". I decided to record to show what I meant. The crash occurs often, but not always, when multiple enemies are hit and start to use the interpolated spin. I've never seen a crash happen so consistently before, it's always only with the rotation interpolate.
The interpolate is self.rotation going to 2160 in 0.6 seconds. {Anything greater than 360 causes another rotation, thus I used a multiple of it for multiple spins.}
I've set the video to start at 4:12, the crash occurs at 4:18.
Is this a bug or am I putting to much strain on the system? Would it be safer to just use rotation? {At least for me, it require a self.integer or rule limit to achieve the same thing a single interpolate can. Is there a "mathematical" way to achieve this by inputting some expression in the editor or into rotation behavior that causes something to spin for a set amount?
As for the interpolate, should I report the crash as a bug, or is it just a limitation(like how the maximum graphic size is 2048?)
It might just be my computer or the new build, though. I just recently put in a slower drive to run the OS as the main drive stopped working. I'm gonna test on android soon, if it crashes there, then it might be a system limitation I'm breaking.
EDIT: On Android, it causes immense stuttering then recovers rather than crashing at those moments, and is triggered when two actors attempt to interpolate spin. Perhaps interpolate is best left for other things, I should go with regular rotation behavior and see how that goes.
Comments
I'd love to take a look at the project if you want to PM me a publishing link. I can't guarantee it's something we can easily fix but I'd like to know what's going wrong at least.
Hi @GeorgeGS thanks for responding. I apologize if it sounds like I wanted interpolate fixed. I'll gladly send the file if it helps GS in general.
Although I won't be using interpolate for the spin effect. But I think finding out what causes the crash in this instance would be useful for future users.
I'm testing out a substitute system that uses constrain to control angular velocity. Uses a few more behaviors, but performance wise, it's doing really well so far.
The Off interpolate bevaior is there to show what use to occupy the space, but now it's replaced by the mod1 method to determine the time spent spinning, constrain for velocity, and else for resetting back to angle 0. Once hitstun goes below the threshold of 20.
Okay, even with the new, non-interpolate system, a cause managed to occur. I managed to narrow it down to a certain two actors, even without interpolate rotation, they cause the crash the moment they even rotate,{they use interpolate for their movements though, unlike the other enemies.} Which leads me to believe rotating for any reason while moving with interpolate causes a crash maybe? Either way, it looks like interpolate has it's hand in this error.
In the file, the actors "Jet Dragon" and "Mach Dragon" have been the main cause of the crashes so far.