実例 エイム

エイム

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!