feat: add rotation vector functions
This commit is contained in:
+1
-2
@@ -109,8 +109,7 @@ void UpdatePlayer(Player *player)
|
|||||||
|
|
||||||
player->sprite.rotation = player->rotation;
|
player->sprite.rotation = player->rotation;
|
||||||
|
|
||||||
float rad = (player->rotation - 90.0f) * (PI / 180.0f);
|
Vector2 dir = RotationToVector2(player->rotation - 90.0f);
|
||||||
Vector2 dir = { cosf(rad), sinf(rad) };
|
|
||||||
|
|
||||||
|
|
||||||
UpdatePhysics(&player->physics, dir);
|
UpdatePhysics(&player->physics, dir);
|
||||||
|
|||||||
Reference in New Issue
Block a user