I hope someone out there can help debug a problem I’m currently having using Spine in 3.24.1 (Using plugins/spine/dist/SpinePlugin.min.js)
It seems to be installed fine, and the spine objects load in the Scene without errors, but they don’t display. Their displayOriginX, displayOriginY, width and height values are Infinity or -Infinity
I’m aware that spine object need to be exported with Spine 3.8 or higher, which these assets are (3.8.99). I’m having this problem both with my spine assets and assets from the Phaser example files which I’m loading into my game.That means I’m probably doing something wrong on my side… but I don’t know what.
If anyone out there has seen this before and some idea where I should look, please let me know
@Milton That worked, thanks so much!! I would never have been able to figure that our without your help!!! So it seems that the version of the Spine plugin that comes with 3.14.1 is actually the incorrect one(?).
I’m getting a different (better?) error now: “Slot not found: name”. This might be because:
@Milton Thanks, we’ve just tried with Spine 3.7.94. Everything now loads fine with no errors, but the spine object doesn’t display on screen. All its values (x, y, width, height etc) seem normal, but displayOriginX and displayOriginY seems strangely different.
Just a little update. Our new animations are breaking when we try and re-export them using 3.7.94, but I was actually able to open and view a 3.7.94 test animation by modifying the spineboy code from the Phaser examples. (No luck yet though getting it to display in our actual game - see post above.)
That’s promising, but even if we do manage to get 3.7.94 to work we’re trying to avoid down-versioning our existing Spine animations as doing that will be quite time consuming. So, I’m back at trying to get the 3.8.95 runtime working again. I took a look at the the examples in Phaser 3.34.1, but noticed they don’t actually seem to work?
It turns out the animations I was loading were using named skins, none of which were named “default”. So, immediately after loading the animation, I set the skin name explicitly, like this: spineAnimation.setSkinByName("nameOfSkin"); That was it! My spine animations now all work just fine using Spine 3.8.99 and Phaser 3.50.1
Even though setting the skin caused the animation to display, I’m still seeing -Infinity and NaN values on displayOriginX and displayOriginY . I thought it might still be OK, until I noticed if I tried to create physics body from the spine object, the body’s x and y values NaN and the body won’t display.
Further update, just for reference. In chatting with my animator, it doesn’t look like the Spine application lets you specifically name an skin as “default”. So, as far I can tell, this would have to be done by manually updating the exported JSON.