feat: add rotation vector functions

This commit is contained in:
huaqo-games
2025-11-06 11:31:48 +01:00
parent 6a1dd65bd4
commit ba2c992728
+1 -2
View File
@@ -109,8 +109,7 @@ void UpdatePlayer(Player *player)
player->sprite.rotation = player->rotation;
float rad = (player->rotation - 90.0f) * (PI / 180.0f);
Vector2 dir = { cosf(rad), sinf(rad) };
Vector2 dir = RotationToVector2(player->rotation - 90.0f);
UpdatePhysics(&player->physics, dir);