We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Reset animations via parameters

Home Forums Programming Reset animations via parameters

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14109
    scalare
    Customer

    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!

    #14113

    Hi,

    basically the play animation puzzle accepts a text value: the name of animated object. The “of” prefix is purely cosmetic.

    Chief 3D Verger | LinkedIn | Twitter

    #14156
    scalare
    Customer

    I’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.

    #14159

    can you share an example of application that did not work?

    Co-founder and lead graphics specialist at Soft8Soft.

    #14163
    scalare
    Customer

    I’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.

    #14224
    scalare
    Customer

    Hey Mikhail,

    we’ve figured this out. The format in which we were passing the parameters wasn’t right. :negative:

    Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.