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 > 5: {
- leftWheel set-velocity to ((leftWheel get-velocity) - 5).
- rightWheel set-velocity to ((rightWheel get-velocity) - 5).
+ if value < 1: {
+ leftWheel set-velocity to ((leftWheel get-velocity) + 15).
+ rightWheel set-velocity to ((rightWheel get-velocity) + 15).
+ } else if value > 10: {
+ leftWheel set-velocity to ((leftWheel get-velocity) - 15).
+ rightWheel set-velocity to ((rightWheel get-velocity) - 15).
}
print value.