Dragging a mesh via gizmo stops its animation

Hi,
I wonder if the following behaviour is intended or it’s a bug:

steps to reproduce:

  • have a mesh with a rotation animation
  • attach movement gizmo
  • move the mesh via the gizmo

expected behaviour:

  • rotation animation keeps playing

current behaviour

  • rotation animation stops

PG

currently I’m workarounding this by removing the animation in onDragStartObservable and starting it again in onDragEndObservable. Is there any cleaner solution? Thanks.

Hi @yedpodtrzitko

This is expected. Animation changes Euler angles and Gizmo adds a Quaternion to the transform node. Quaternion replaces Euler angles when present. A possible solution is to set object rotationQuaternion to null and play again animation.

2 Likes

Argh, cedric was faster. Here is the playground anyway: https://playground.babylonjs.com/#PWFGIA#1

2 Likes