webglstudio.js icon indicating copy to clipboard operation
webglstudio.js copied to clipboard

How to trigger animations on click event using Graph (GUI editor)?

Open KnightCoder opened this issue 5 years ago • 2 comments

Lets say I have various takes in an animation or I've multiple @scene animations on different nodes of a model.

Using Graph (GUI), lets say I've placed multiple choice component (radio button) and I want to trigger each of these animations based on the choice of the options.

How can I do this using Graph (GUI) ?

KnightCoder avatar Apr 25 '20 16:04 KnightCoder

image

jagenjo avatar Apr 25 '20 18:04 jagenjo

@jagenjo I think this would only set the value of the variable take. But how do I trigger the animation and its take? I noticed that LS.PlayAnimation.play method plays animation but getAnimation and getTake gets the animation and its takes respectively.

Hence, please show using the Graph GUI: How we can execute the play a selected take of an animation? How can we trigger another function on start_animation and end_animation events?

KnightCoder avatar Apr 25 '20 22:04 KnightCoder