• International中文
  • 我如何创建一个Sprite挂载到spine的节点下 跟随节点一起运动

我如何创建一个Sprite挂载到spine的节点下 跟随节点一起运动,
我使用的是pixi-spine 4.0+

我的预想是这样 但实际上并不能

    const customSprite = spine.newSprite(Texture.from(....))
    const defName = 'abc’
    customSprite.attachment!.name = defName 
    spine.skeleton.setAttachment(slotName, defName)
  • Davide đã trả lời bài viết này.
    Related Discussions
    ...

    xuye

    Hello!
    We are not the maintainers of pixi-spine.
    Our official runtimes are spine-pixi-v7 and spine-pixi-v8, which are compatible with Pixi v7 and Pixi v8, respectively, and support Spine assets of version 4.2. We can provide better support if you use these runtimes.

    With these runtimes, you can easily use slot objects to add a Pixi sprite to a slot. Alternatively, you can work at a lower level by changing the attachment directly using the Spine core API. Let me know, if you need that.

    If yo really want to continue to use pixi-spine, as far as I know there are hackTextureXXX methods that might be suitable for your needs. You can find their signatures here.