New to Godot and coming from a beginner+ Python background.
I have a block of code in a controller that should be adjusting an angle based on a destination variable. The signals appear to be working and setting the variable correctly, as I have them printing to the console:
SKILL 1 Dest: (1000, 440) # Correct
SKILL 1 Dest: (580, 440) # Correct and skill1dest was changed after signal was rec'd
Card 1, Skill 1, Pressed # Simple notification
SKILL 1 Dest: (1600, 700) # Manually set in code
SKILL 1 Angle: 0.007368 # This is the angle for (580, 440) not (1600, 700)
skill_1_dest = Vector2(1600,700) # Manually setting the destination
print("SKILL 1 Dest: " + str(skill_1_dest))
skill_1_angle = skill_1_loc.angle_to(skill_1_dest) # Is this the error?
skill_1_angle = skill_1_angle / -57.2958 # Adjusting for radians
print("SKILL 1 Angle: " + str(skill_1_angle))
skill_1_loc is static and never changes, its location is (580,640), which is directly below the destination (580, 440).
Am I using "angle_to" incorrectly? There is not much said in the documentation online:
https://docs.godotengine.org/en/stable/classes/class_vector2.html#class-vector2-method-angle-to
What have I missed?
Thank you in advance,
-Mark