Motor () Position
( motor ( v) position :: extension reporter )
Category LEGO BOOST
Type Reporter
Introduced in 3.0

The motor () position block is a reporter block and a LEGO BOOST block. It returns the degree that the selected motor is currently positioned at.

Example Uses

  • Constantly point in the direction of a motor
when green flag clicked
forever
    point in direction (motor (a v) position :: extension)
end
  • Detect when a motor is exactly facing a certain direction
when green flag clicked
forever
    if <(motor (a v) position :: extension) = [90]> then
        say [Spot on!]
    end
end
  • Create a chase game, where tilting the motor is the main mechanic
when green flag clicked
forever
    point in direction (motor (a v) position :: extension)
    move (10) steps
end