decentraland / decentraland/sdk

[BUG] `shouldReset` doesn't work as it should

Open
#1,086 1 comment 0 reactions 0 assignees View on GitHub
bug need validation new
Dominant language
No language data
Stars
4
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When `shouldReset=true` the animation should be reset when it finishes (https://docs.decentraland.org/creator/development-guide/sdk7/3d-model-animations/)
![imagen](https://github.com/decentraland/sdk/assets/8042536/df3a6c8f-e8d2-4170-befe-349c1cbbb735)

Video:

https://github.com/decentraland/sdk/assets/8042536/a27d6e37-8ab4-410e-b14b-b0ee2761b7e4

Code to repro
```typescript
function main() {
const newEntity = engine.addEntity()
GltfContainer.create(newEntity, { src: 'assets/teleporter/teleporter.glb' })
Transform.createOrReplace(newEntity, {
position: Vector3.create(2, 0, 8)
})

Animator.create(newEntity, {
states:[
{
clip: "teleportOpen",
playing: true,
loop: false,
shouldReset: true,
},
{
clip: "teleportClose",
playing: false,
loop: false
}
]
})
}
```

[assets.zip](https://github.com/decentraland/sdk/files/14487017/assets.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.