How does it work api.setMatrix?

(Madalin Berechet) #1

How does it work api.setMatrix? Could we change animation parameters, like position, with this function? I noticed that node. localMatrix[14] and node. worldlMatrix[14] stores the x position parameter of an animate node, where is the scene name of an animate cube and node.type = “MatrixTransform”.

(Cedric) #2

setMatrix is like replacing the local matrix of the model. So yes you have full control of the local matrix. If you only want to translate. You could use translate:

  • translate( nodeID, translateTo, duration, easing )
  • setMatrix( nodeID, matrix )

Note that those api calls are a bit experimental


(Madalin Berechet) #3

Many thanks!