Quick answer: Pygame Vector2.rotate giving wild results? It takes degrees. The Vector2.rotate_rad variant takes radians — mixing them up multiplies everything by 57.
Aiming logic computes an angle via math.atan2 (radians) then passes it to Vector2.rotate (degrees). Bullets fire in random directions.
rotate vs rotate_rad
# degrees
v.rotate(90)
# radians
v.rotate_rad(math.pi / 2)Both produce the same rotation. Pick one convention per project and stick to it — mixing is a source of constant bugs.
Atan2 Returns Radians
math.atan2(dy, dx) returns radians in −ππ. Convert with math.degrees before rotate or use rotate_rad directly.
Coordinate System Y
Pygame Y is flipped (down is positive). Rotations behave like a left-handed coordinate system — pre-negate angles if you copied formulas from a standard math-Y-up system.
Verifying
Bullets fire toward the cursor consistently. Rotations in code match visible direction changes.
“Vector2.rotate uses degrees. rotate_rad uses radians. Pick one convention.”
Default to degrees in gameplay code — designers think in degrees and the API is shorter. Reserve radians for the math layer.