• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Vibrating object

Scheduled Pinned Locked Moved SketchyPhysics
7 Posts 5 Posters 788 Views
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.
  • F Offline
    fredfy
    last edited by 10 May 2009, 17:24

    hello, is it someone who knows how to make an object vibrate?

    either up and down or from side to side

    1 Reply Last reply Reply Quote 0
    • M Offline
      MrPlanet
      last edited by 10 May 2009, 17:37

      oscillator(20.0)
      

      Or...

      [1,0][(frame/3)%8]
      

      I reject your reality and substitute my own.

      1 Reply Last reply Reply Quote 0
      • F Offline
        fredfy
        last edited by 10 May 2009, 22:34

        thank`s a lot!

        Is it some way to trigger the oscillator at a certain frame or when another object is in a specified position? i tried this with no sucsess:

        If getvar("servo")==0.6; setvar("oscillator",20.0);end

        1 Reply Last reply Reply Quote 0
        • P Offline
          Physicsguy1
          last edited by 10 May 2009, 22:43

          You can't set off an oscillator right now.

          1 Reply Last reply Reply Quote 0
          • B Offline
            BTM
            last edited by 11 May 2009, 00:30

            ...Yes you can.

            if slider("foo")>=0.6 then oscillator(20);else slider("foo");end;
            

            what that does is that, if the slider 'foo' is in a position above 0.6, then the joint will become an oscillator that oscillates 1 time each 20 frames. Otherwise (if the 'foo' slider is bellow 0.6) the joint will move to the position it would normally move to.

            if frame>=250 then oscillator(20);else slider("foo");end;
            

            what THAT does is that the slider foo dictates the joint's position, but if the simulation has gone by frame 250, the joint will just be an oscillator which oscillates once every 20 frames.

            ... As for if a joint is in a specific position in the simulation or not, no it's not possible. You can't find out if a non-controllable slider is at 0.6 or not, or anything on the lines of that. Sorry 😐 .

            ...I hope those help. 😉

            1 Reply Last reply Reply Quote 0
            • P Offline
              Physicsguy1
              last edited by 11 May 2009, 22:34

              OH sorry about that. I hadn't heard about that yet.

              1 Reply Last reply Reply Quote 0
              • W Offline
                Wacov
                last edited by 12 May 2009, 15:21

                If you want your vibrating object to be movable, attach a hidden, noCollision counterweight using a rapidly oscillating slider/piston joint (You can use BTM's code). The counterweight can be inside the object.

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

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

                Advertisement