示例 瞄准

瞄准

atan2() 函数计算两个位置之间的角度。它计算的角度可以用来让一个形状朝向某物旋转。在这个示例中,眼睛旋转以便看向光标。

Creative Commons BY-NC-SA license badge

瞄准: Revised by Darren Kessner, Malay Vasa. Edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.

You can find the code history of these examples here: pre-2023 example, 2023 code. You can suggest improvements by contributing to the current website!