sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    Start animation on frame

    Scheduled Pinned Locked Moved SketchyPhysics
    8 Posts 2 Posters 1.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wyatt
      last edited by

      I have created a scene with multiple SP animations. I need two objects to begin moving at the start of the animation. I would like the third object to begin at a specified frame #. If I set everything to run from the beginning, the file works fine. If I change Object 3 to start on a delay (I have tried using "if frame>200" and also tried "if frame==200"), Objects 1 and 2 start to move, but after Object 3 starts, the file crashes. I'm using ontick for all 3 objects. Is there a different set of commands I should be using?

      1 Reply Last reply
      Reply Quote 0
      • W
        wyatt
        last edited by

        Any help from SP users? Is delaying part of simulation possible?

        1 Reply Last reply
        Reply Quote 0
        • M
          Mr.K.1
          last edited by

          It is possible yes, you probably just have some errors in the code/model.

          Best if you attach your model, or paste the code so we can have a look at it.

          1 Reply Last reply
          Reply Quote 0
          • W
            wyatt
            last edited by

            That model is on my computer at work, but I'll stop by there later and post part of it. The code I have is all probably your stuff anyway, ha! Thanks.

            1 Reply Last reply
            Reply Quote 0
            • W
              wyatt
              last edited by

              Mr. K, here is the model with some more detail on what I'd like to do and what I've tried.


              SP_DelayAnimation.skp

              1 Reply Last reply
              Reply Quote 0
              • M
                Mr.K.1
                last edited by

                Think I got what you needed.

                I was going to explain the script line by line but this forum is exceptionally horrible for posting code, so if there is anything specifically you won't understand just ask me later.


                SP_DelayAnimation.skp

                1 Reply Last reply
                Reply Quote 0
                • W
                  wyatt
                  last edited by

                  This works perfectly, and even the curves stayed oriented the right way. Compensating for stopping distance was brilliant. This was more complicated than the one line of code I was trying to change. Thanks so much!

                  The one thing I don't understand is the second line below:

                  dir=position.vector_to(evalCurveAbs("camera3", @new_distance1))
                  dir.length/=5
                  setVelocity(dir.to_a)

                  The first line sets the direction of the object to follow the path named camera3 for a set distance. The third line sets the speed. What does "dir.length/=5" do?

                  1 Reply Last reply
                  Reply Quote 0
                  • M
                    Mr.K.1
                    last edited by

                    dir.length/=5 simply divides the pulling vector length/strength by 5, that way the pull is more gentle and the starts are smoother( a more car like movement), greater the number gentler the pull.
                    But going too far with speed and smoothing can cause rubber banding.

                    1 Reply Last reply
                    Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better đź’—

                    Register Login
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement