Hi,
a question, How to write an animation (rotate) for transform node.
My code is here.
const [rootNode, setRootNode] = useState<TransformNode>();
const [animRotateRootNode, setAnimRotateRootNode] = useState<any>();
....
if (engine) {
const scene = new Scene(engine);
setScene(scene);
const rootNode = new TransformNode('Root Container', scene);
setRootNode(rootNode);
var animRotateRootNode = Animation.CreateAndStartAnimation("animRotateRootNode",
rootNode, "rotate", 30, 600,
rootNode.rotate, rootNode.rotate( Vector3.Down(), Math.PI));
animRotateRootNode.loopAnimation = false;
animRotateRootNode.disposeOnEnd = false;
setAnimRotateRootNode(animRotateRootNode);
But I get :
TypeError: null is not an object (evaluating 'animRotateRootNode.loopAnimation = false')