sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    All known scripts

    Scheduled Pinned Locked Moved SketchyPhysics
    30 Posts 8 Posters 3.5k Views 8 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 Offline
      Wacov
      last edited by

      @unknownuser said:

      Wacov; your script changes the distance to larger, and speed to slower, the more you move it left.

      ...So here's a model with a few tries at changing speed only. right one is just plain oscillator(50), middle one works best, but is reversed for some reason, and the order can't be reversed. one on the left is the one that, to me, makes no sense at all, and I think it's a bit funny so I posted it.
      [attachment=0:xf9qtpt5]<!-- ia0 -->test_session.skp<!-- ia0 -->[/attachment:xf9qtpt5]
      NOTE: use arrow keys.

      Hmmm... I don't think the distance is less, it's just the joint trying to keep up with the oscillator, which is changing direction before the joint can get where it's supposed to be. Yours is better, but it it still spazzes out when you use a slider or joystick for the control 😄

      Just hope Chris comes up with something, or there won't be any controllable walkers...

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

      1 Reply Last reply Reply Quote 0
      • B Offline
        BTM
        last edited by

        @wacov said:

        Hmmm... I don't think the distance is less, it's just the joint trying to keep up with the oscillator, which is changing direction before the joint can get where it's supposed to be. Yours is better, but it it still spazzes out when you use a slider or joystick for the control 😄

        Just hope Chris comes up with something, or there won't be any controllable walkers...

        What spazzes? I didn't see any issues, well except that when the speed is changed it goes back to the original position, if that's what you mean.

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

          That is what I mean... it makes it effectively unusable for anything involving dynamic, analogue input. I can't see there being a way around this without delving into the fabric of sketchyphysics, so just leave it to Chris.

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

          1 Reply Last reply Reply Quote 0
          • B Offline
            BTM
            last edited by

            I think this might be the first controllable sketchyphysics walker... I call it: the FunnyWalker. You'll see why. Use W and S, and the up and down arrows, to control it. NOTE: controls are reversed for speed (I don't know why, and there was no way of fixing it). Don't use a joystick, because it will be a bit messed up if you do.
            walkertest2.skp
            I did cheat a bit by using a gyro though 😳

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

              Whaddya mean, no way to fix it?!? oscillator(50/(-righty+1)) does the trick nicely 😄

              Good walker, shame about the joysticks

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

              1 Reply Last reply Reply Quote 0
              • K Offline
                klaufi
                last edited by

                controllable oscillators:

                Math.sin(frame/(10*slider('speed')))/3.0

                just an example, numbers are replacable, also you can add constants, use Math.cos or use keys and so on

                1 Reply Last reply Reply Quote 0
                • B Offline
                  BTM
                  last edited by

                  I thought It would be possible with a math.sin script! 😄 Thanks!
                  ...Now anyone here want to explain how to use math.sin, or math.cos, or any other scripts of that type, so I can customize it?

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

                    That formula is going to have the same problem as the other ones. Its a little hard to understand, but because it is based on frame and nothing else if you change the slider the oscillating body is going to try to jump around.

                    I think to make it work right it is going to require the ability to store values from one frame to the next and a bit more math. The first will be in next release.

                    Then I can try to figure out the math. After I will update the oscillator script command to make it work correctly.

                    Math.sin is just a trig sine function. You may or may not need it for any given script. It just depends on what you are trying to do.

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

                      please someone help me: I don't have any idea how any of these works, so I'm going to ask one simple question: I'm trying to make a dynamic oscillator, one that basicly goes haywire in parameters it has been given. is this possible with any of these scripts?

                      My WIP Thread:Here

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

                        Not with the current version.

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

                          cheers i guess, thanks for trying

                          My WIP Thread:Here

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            BTM
                            last edited by

                            @hobbnob said:

                            cheers i guess, thanks for trying

                            You can get fairly random movement if you type in something like

                            oscillator(60)+oscillator(379)*oscillator(-515)+oscillator(223)*oscillator(725)
                            

                            That's just an example, I don't know exactly how well it would work. The point is, if you type in random numbers, plus other random numbers, at speeds varied by other random numbers, the results will be nothing short of random. Well, almost. After a while it would loop.

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

                              There is also a rand command.

                              This will give a random number from 0.0 to 1.0

                              rand()
                              

                              And this will give a random number from 0 to 100

                              rand(100)
                              
                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                Physicsguy1
                                last edited by

                                The object seems to prefer a higher value, like 0.9. I haven't seen it go back to the original position yet.

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

                                  thanks the rand command worked perfectly, and also: BTM your walker is not the firstf i almost uploaded my scarab walking tank as my 150th remember? guess not...

                                  My WIP Thread:Here

                                  1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    phy
                                    last edited by

                                    Anyone know if you can use the mouse buttons. It is in the virtualkeycodes.rb as rbutton and lbutton and since you can use pretty much all the other keys, I was wondering if you can use the mouse buttons.

                                    Tableau de comparaison de Staxyn s'agit d'un mГ©dicament uniquement sur ordonnance.

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

                                      Those values in the key table don't work. I think there is a conflict because Sketchup is using the mouse.

                                      1 Reply Last reply Reply Quote 0
                                      • 1
                                      • 2
                                      • 2 / 2
                                      • First post
                                        Last post
                                      Buy SketchPlus
                                      Buy SUbD
                                      Buy WrapR
                                      Buy eBook
                                      Buy Modelur
                                      Buy Vertex Tools
                                      Buy SketchCuisine
                                      Buy FormFonts

                                      Advertisement