Rotation based on end points

前端 未结 4 1163
别那么骄傲
别那么骄傲 2021-01-21 12:03

I\'m using pygame to draw a line between two arbitrary points. I also want to append arrows at the end of the lines that face outward in the directions the line is traveling.

4条回答
  •  Happy的楠姐
    2021-01-21 12:24

    just to append to the above code, you'd probably want an event loop so it wouldn't quit right away:

    ...
    clock = pygame.time.Clock()
    running = True
    
    while (running):
        clock.tick()
    

提交回复
热议问题