Skip to content

Commit c7622c3

Browse files
Update Model3DRuntimeObject3DRenderer.ts
1 parent 71f7b59 commit c7622c3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Extensions/3D/Model3DRuntimeObject3DRenderer.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ namespace gdjs {
334334
if (!this._action) {
335335
return true;
336336
}
337-
// If this animation is looping, we dont want it to be able to send "true" as it must be endless.
338-
return !this._action.isRunning() && !this._action.loop;
337+
return !this._action.isRunning();
339338
}
340339

341340
animationPaused() {
@@ -373,11 +372,9 @@ namespace gdjs {
373372
const previousAction = this._action;
374373
this._action = this._animationMixer.clipAction(clip);
375374

376-
// The action must be reset before being reconfigurated with enabled and setLoop to prevent previous action parameters causing problems
377-
this._action.stop();
378-
379-
// This is absolutely required for the good functioning of animation crossfading
380-
this._action.enabled = true;
375+
// The action must be reset before being reconfigurated with enabled and setLoop to prevent previous action parameters causing problems
376+
// such as animations not playing (not sure to which extends it can cause problems nor the origin of these problems)
377+
this._action.reset();
381378
this._action.setLoop(
382379
shouldLoop ? THREE.LoopRepeat : THREE.LoopOnce,
383380
Number.POSITIVE_INFINITY

0 commit comments

Comments
 (0)