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.

resume animation backwards

Home Forums Puzzles resume animation backwards

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #5114
    johngrigni
    Customer

    I wanted to make a way to move something left or right via html buttons. I made an animation of the object turning around to the right, then used a ‘pause animation’ puzzle to hold it still, and a ‘resume animation’ inside a ‘on mouse down’ puzzle and another ‘pause’ inside a ‘on mouse up’ puzzle. But there is no way to ‘resume backwards’ for the left turn. I can’t use a play because it starts at a set frame, and I’m not sure how the get the appropriate frame number to put in a variable, or how to handle a loop that starts somewhere other than frame 1.

    To go left, do I just use an empty with the counter-rotating animation in the original file, parent the object to it, and then set up separate pause and resume steps for the ‘left turn’ button?

    Is there an easier way or should I just set up nested empties if I want to add up and down?

    #5116

    Is it necessary to use animation, may be you can use Set Transform node if the movement of your object is straightforward? Then you can just use bottons to start moving it and then pause and then moving it backward.

    Co-founder and lead graphics specialist at Soft8Soft.

    #5117
    johngrigni
    Customer

    The set transform node acts instantly, and I’m looking for something more subtle.

    If I set the value down low, like 1 degree, do I then just loop it?

    I tried setting up a loop while var=true setup, then use buttons to set the variable true or false, but it just seems to hang the system up.

    #5118
    johngrigni
    Customer

    Here is an image. It not only locks up that tab of my browser, but also the App Manager tab as well. This is in Safari on a Mac.

    #5121

    Here is an image. It not only locks up that tab of my browser, but also the App Manager tab as well. This is in Safari on a Mac.

    Better to use Do Every Frame puzzle instead of While. Look at my example.

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead graphics specialist at Soft8Soft.

    #5125
    johngrigni
    Customer

    Thanks!
    Next big question: Is there a way to use an objects local coordinates instead of global for such a transform? So if a car turns to the right, and I want it to go forward, not to the side, how do I do that?

    #5126
    johngrigni
    Customer

    I just noticed that the rotation does seem to keep local coordinates, but position doesn’t.

    #5127

    Hi,

    Aren’t you by any chance making an app where the user can move items on the scene (such as furniture)? I’m asking because we are going to release new puzzles for dragging objects with the mouse – which can come in handy if this is the case.

    Chief 3D Verger | LinkedIn | Twitter

    #5128
    johngrigni
    Customer

    No, it started as a way to move the camera with icons, and became generalized. I might try to modify the WASD controller from the examples (minus the jump-space), but that involves coding, which by this point I’m sure you know I’m terrible with coding. I’m not even sure how I could use code from the examples in a new project.

    But in any case, I could have it licked if I knew how to translate the global set position values to local for the object.

    I’m thinking of making everything else pivot and move, and leaving the object and the parented camera stationary. But I have some objects with reflections from the world texture, and I’m not sure what that will do to it.

    #5129

    how to translate the global set position values to local for the object.

    Moving objects in local space is in our nearest plans. Stay tuned!

    Chief 3D Verger | LinkedIn | Twitter

    #5131
    johngrigni
    Customer

    Thank you, and I am very much looking forward to the new improvements you mention!

    #5679
    johngrigni
    Customer

    I’ve downloaded 2.5, which is a very nice set of additions, thank you!

    But, I still can’t get a local coordinate going with, for instance, a camera. If I rotate an empty with the camera parented to it, I can make it rotate left and right fine, but up and down is obviously using global coordinates, not local. Unless I start out pointing exactly along the Y axis, rotating along the X axis makes it corkscrew. I tried setting the coordinates in Blender to local but that has no effect.

    Am I missing something? I’m usually missing something obvious. I’ve thought of a very clumsy ways around it, by rotating everything but the camera. Or setting a bunch of nesting empties with rotation animations and playing the animations. But I was hoping for something more elegant.

    #5690

    Hi john, there’s no puzzle for local transforms, but it can be done with code and the “call JS function” puzzle.
    I attached an example, where you can find functions called “moveLocal” and “rotateLocal” used in puzzles, they are defined in the local_transforms.js file in the “prepareExternalInterface” function.
    Hope it helps!

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

    #5709
    johngrigni
    Customer

    Thank you! The movement is a little jerky, but it should work.

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