[SOLVED] [Spine 2D] How to set cursor of animation on second track?

I have two animations: one is started on track 1, while on track 2 I have another animation with go.PLAYBACK_NONE to manually set cursor.
However, “set” interface has no option to point track number:

– Set the cursor to position 0
go.set("#spinemodel", “cursor”, 0)

So, looks like “set cursor” is possible to use only in case of one animation and one track.

Digging in extension cpp code found solution

 *   -- Get the cursor value for the second animation track
 *   cursor = go.get("#spine", "cursor", { index = 2 })

Why API reference and other documentation has no this info?

Here are some links for cursor property and an example.

All your links have no clue about solution:
cursor = go.set("#spine", “cursor”, 0.0, { index = 2 })

Actually, first your links are not related to Spine. Third one tells only go.set("#sprite", “cursor”, 0.0)

I checked as well - no info about additiona param {index = 2} for specifying track index

1 Like

You are right, maybe this information can be added to the properties / cursor section for the spine animation manual.

I don’t know much about spine or the track index , Maybe someone else can create a PR or an issue on the extension github . The doc is located here: