FriendlyCosmonaut's banner
FriendlyCosmonaut's profile picture

FriendlyCosmonaut

@friendly_cosmo5,088 subscribers

🚀A friendly cosmonaut gamedev 💫 https://t.co/zfsaggeM98

Shorts

An essential bit of gamedev math - atan2! We often know a target's position and want to face it. But how do we get the angle? angle = atan2(y / x) Or in 3D... angle = atan2(x / z) (We can also see below, what happens if we use atan instead of atan2) #godot #gamedev

An essential bit of gamedev math - atan2! We often know a target's position and want to face it. But how do we get the angle? angle = atan2(y / x) Or in 3D... angle = atan2(x / z) (We can also see below, what happens if we use atan instead of atan2) #godot #gamedev

110,413 views