vehicle move to (10, 2, 5).
- leftWheel = (vehicle add-wheel at (-.5, 0, -1.5)).
- rightWheel = (vehicle add-wheel at (-.5, 0, 1.5)).
+ leftWheel = (vehicle add-wheel at (-2, 0, -1.5)).
+ rightWheel = (vehicle add-wheel at (-2, 0, 1.5)).
+ vehicle add-wheel at (1, 0, 0).
leftWheel set-velocity to 15.0.
rightWheel set-velocity to 15.0.
value = sensor get-sensor-value.
- if value < 5: {
- leftWheel set-velocity to ((leftWheel get-velocity) + 5).
- rightWheel set-velocity to ((rightWheel get-velocity) + 5).
+ if value < 2: {
+ leftWheel set-velocity to ((leftWheel get-velocity) + 1).
+ rightWheel set-velocity to ((rightWheel get-velocity) + 1).
}
- if value > 5: {
- leftWheel set-velocity to ((leftWheel get-velocity) - 5).
- rightWheel set-velocity to ((rightWheel get-velocity) - 5).
+ if value > 2: {
+ leftWheel set-velocity to ((leftWheel get-velocity) - 1).
+ rightWheel set-velocity to ((rightWheel get-velocity) - 1).
}
print value.