as the title suggested, the 2d collision is no longer attached to the sprite after using FixSpriteToSkeleton2D().
I have the code use with the spine demo project to prove it below.
The circle is suppose to be where the white square is, but it is doing thing on it's own?
setvirtualresolution(1024,768)
SetClearColor( 151,170,204 )
SetScissor(0,0,0,0)
SetGenerateMipmaps(1)
SetPrintSize( 20 )
SetVSync(0)
SetSyncRate(0, 1)
/*
CreateDummySprite(100)
SetSpriteShapeCircle(100, 0, 0, 50)
SetSpritePhysicsOn(100, 2)
SetSpriteDepth(100, 3000)
*/
// nice fonts
UseNewDefaultFonts( 1 )
createsprite(2, 0)
setspritesize(2, 100, 100)
SetSpritePosition(2, 500, 300)
setspriteshape(2, 3)
SetSpritePhysicsOn(2, 2)
SetSpriteDepth(2, 99)
SetPhysicsDebugOn()
// load atlas image
LoadImage( 15, "test.png" )
// load JSON exported Spine file
LoadSkeleton2DFromSpineFile( 1, "spineboy.json", 1, 15, 1 )
// position it near the bottom of the screen
SetSkeleton2DPosition( 1, 512, 768 )
SetSkeleton2DDepth(1, 100)
createsprite(1, 0)
SetSpriteSize(1, 25, 25)
SetSpritePhysicsOn(1, 2)
setspriteshapecircle(1, 0, 0, 50)
FixSpriteToSkeleton2D(1, 1, 11, 50)
// play the walk animation
PlaySkeleton2DAnimation( 1, "walk", 0, 1, 0.3 )
speed# = 1.0
tweentime# = 0.2
angle# = 10
do
print(getskeleton2dbone(1, "head"))
// Space key
if GetRawKeyPressed( 32 ) = 1
if ( speed# < 0 )
PlaySkeleton2DAnimation( 1, "jump", 10, 0, tweentime# )
else
PlaySkeleton2DAnimation( 1, "jump", 0, 0, tweentime# )
endif
endif
// when the animation stops playing after a jump restart the walk animation
if GetSkeleton2DIsAnimating(1) = 0
PlaySkeleton2DAnimation( 1, "walk", 0, 1, tweentime# )
endif
// W key
if GetRawKeyState( 87 ) = 1
head = GetSkeleton2DBone( 1, "head" )
angle# = angle# - 1.5
SetSkeleton2DBoneAngle( 1, head, angle# )
endif
// S key
if GetRawKeyState( 83 ) = 1
head = GetSkeleton2DBone( 1, "head" )
angle# = angle# + 1.5
SetSkeleton2DBoneAngle( 1, head, angle# )
endif
// A key
if GetRawKeyState( 65 ) = 1
speed# = speed# - 0.01
SetSkeleton2DAnimationSpeed( 1, speed# )
endif
// D key
if GetRawKeyState( 68 ) = 1
speed# = speed# + 0.01
SetSkeleton2DAnimationSpeed( 1, speed# )
endif
// Q key
if GetRawKeyState( 81 ) = 1 then tweentime# = 0
// E key
if GetRawKeyState( 69 ) = 1 then tweentime# = 0.2
Print( "Press W and S to tilt the head" )
Print( "Press A and D to modify the speed" )
Print( "Press Q and E to turn tweening on and off" )
Print( "Press Space to jump" )
print ( screenfps() )
Print( "Speed: " + str(speed#) )
if tweentime# > 0
Print( "Tweening: On" )
else
Print( "Tweening: Off" )
endif
sync()
loop
Any help appreciated!