Home › Forums › Programming › Reset animations via parameters
- This topic has 5 replies, 3 voices, and was last updated 5 years, 6 months ago by scalare.
-
AuthorPosts
-
2019-04-20 at 4:17 pm #14109scalareCustomer
Hello,
I’m trying to reset animations of specific objects to frame 0 when a specific event occurs in the HTML page that holds the 3D scene. I’m trying to do this with the app.ExternalInterface function, to call a puzzle to do that. I’ve been able to control all kinds of behaviors at the 3D side with this, like hiding and showing objects, changing materials on the fly, loading external gltf files into the scene, enable outline effects for specific objects, or tweening cameras to make them look at specific empty objects, etc., all of them accepting parameters sent from the javascript file.
But it seems that resetting animations won’t work. I want to do this using the “set animation … frame to…” puzzle. The problem I have is that the puzzle is supposed to accept an “of object” in the first parameter, and not just an object name, which is what I’m sending in the javascript parameter when I make the call to the puzzle via app.ExternalInterface. Is there a way to “concatenate” the “of” part to a param0, for example and use that as the first parameter in the puzzle?
I hope this makes sense. I’m attaching some images to illustrate what I mean.
Thanks in advance!
2019-04-21 at 7:27 am #14113Yuri KovelenovStaff2019-04-23 at 4:36 pm #14156scalareCustomerI’m afraid this did not work. We’ve given up, and we’re creating custom functions at the puzzles to reset animations of several objects to frame zero (hardcoding their names in the puzzles), and calling them via app.ExternalInterface under a specific “function” name, so we can reset several animations in just one call.
We’ve tried passing the object names as param0, and also as collections with the “GROUP” hackery, but none of them worked. It looks like a potential bug, unless we’re missing something.
Thank you anyway.
2019-04-24 at 7:45 am #14159Mikhail LuzyaninStaffcan you share an example of application that did not work?
Co-founder and lead graphics specialist at Soft8Soft.
2019-04-24 at 9:54 am #14163scalareCustomerI’m afraid I would have to disclose too many things to show you the way we have it now. I’ll see if I can create an example of just this interaction without all the HTML interface elements we have to share it.
Thank you, Mikhail.
2019-04-25 at 12:09 pm #14224scalareCustomerHey Mikhail,
we’ve figured this out. The format in which we were passing the parameters wasn’t right.
Thank you.
-
AuthorPosts
- You must be logged in to reply to this topic.