Vibrating object
-
hello, is it someone who knows how to make an object vibrate?
either up and down or from side to side
-
oscillator(20.0)
Or...
[1,0][(frame/3)%8]
-
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
-
You can't set off an oscillator right now.
-
...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.
-
OH sorry about that. I hadn't heard about that yet.
-
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.
Advertisement