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!
    🚨 Skimp | 25% Off until March 30 Buy Now

    Frames

    Scheduled Pinned Locked Moved SketchyPhysics
    6 Posts 3 Posters 675 Views 3 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.
    • H Offline
      hobbnob
      last edited by

      I was wondering: Is it possible to have a random movement in frames? It's just that I've made a frame powered aircraft (the first on the warehouse) and i was wondering if it's possible instead of having programmed functions like a bit left a bit right etc it could be random. also, can someone explain the script? i can put it in and change the moving values, but don't want to touch anything just in case. can someone help please?

      My WIP Thread:Here

      1 Reply Last reply Reply Quote 0
      • W Offline
        Wacov
        last edited by

        'rand' generates a random value bigger than 0 and smaller than 1. It'll refresh every frame, but there's no way at the moment to stop this; if it's too fast, I guess you could decrease the joint's accel, but there's not that much you can do from within the script. I'm not sure what you mean by 'explain the script'... can you go into more detail?

        http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

        1 Reply Last reply Reply Quote 0
        • H Offline
          hobbnob
          last edited by

          What i mean is: I've learnt this code: [0,1,0,1][(frame/50)%5]
          however the only bit i know about is the [0,1,0,1] bit,omeone xplain what the other bits do?

          My WIP Thread:Here

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wacov
            last edited by

            Have a look at this thread, I posted a pretty thorough guide:
            http://www.sketchucation.com/forums/scf/viewtopic.php?f=61&t=17539&start=0

            http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

            1 Reply Last reply Reply Quote 0
            • H Offline
              hobbnob
              last edited by

              ok i understand the 50 bit now, but i don't have a clue about th %5 bit, please help!

              My WIP Thread:Here

              1 Reply Last reply Reply Quote 0
              • C Offline
                CPhillips
                last edited by

                %5 means "Modulo 5" in math terms:
                http://en.wikipedia.org/wiki/Modulo_operation

                In this case it makes sure that frame/50 is never more that 5. Once it reaches 5 it will start at 0 again.

                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