Godot Version
4.2.2
Question
So. I am having issues with rotating the player on slopes larger or smaller then 45 deggrees. This is the code:
This is what it looks like:
if (is_on_floor()): #Checks if the player is on the floor...
canJump = true #If so, set the canJUump variable to true
jumpCount = 1 #And set the jumpCount to 1, to reset the jump
var floorNormal = get_floor_normal()
var slopeAngle = atan2(floorNormal.x, floorNormal.y) - PI/2
rotation = slopeAngle
If you need more details, i can give you them
EDIT:
For more context, i will say that the player doesnt properly match the slopes angle, if that gave more conext to the issue i am having