Requires you to have installed Principia on your device.
Play Principia in your browser! Experimental, mobile devices not supported.
Downloads: 21 - Level ID: 1539
@owhame answered here
function init(is_sandbox)
player = {x = 0, y = 0, angle = 0, vel = 1}
game:activate_rc_by_id(9)
end
function step(count)
player.angle = this:read(0) 2 math.pi
rc_x, rc_y = world:get_entity_by_id(9):get_position()
this:set_draw_tint (0, 0, 255, 255)
this:draw_line (rc_x, rc_y, rc_x + math.cos(player.angle) 0.5, rc_y + math.sin(player.angle) 0.5, 0.05)
cam:set_position(rc_x, rc_y, 10)
end