S2 Ramp Code
william chan
Posts: 1,326
I wrote my own ramp up and down code like this
but the S2's movement stop momentarily at each speed change. This makes the movement jerky.
How do I ramp smoothly?
PRI ramp_forward(Dist)
if Dist < 1000 ' minimum dist
s2.set_speed(7)
s2.go_forward(Dist)
return
s2.set_speed(5) ' Ramp Up 500
s2.go_forward(100)
s2.set_speed(10)
s2.go_forward(400)
s2.set_speed(15) ' Full speed ahead
s2.go_Forward(Dist-1000)
s2.set_speed(10) ' Ramp Down 500
s2.go_forward(400)
s2.set_speed(5)
s2.go_forward(100)
but the S2's movement stop momentarily at each speed change. This makes the movement jerky.
How do I ramp smoothly?

Comments
But I am thinking that since the S2 object works at such a higher level of abstraction you don't need to ramp by hand.