Getting the rotation of a spawnpoint node

Godot Version

v4.2.2.stable.official [15073afe3]

Question

Hello, I’ve created a spawnpoint node in my 3D game, so that when I enter through a door to another scene, it will spawn set player position to one of the “spawn nodes” in the next scene "for example; I have 4 nodes, North, East, South and West, when entering the scene my player’s position will be set to the East node), this works fine, but I can’t find a way to take the “spawn node’s” rotation and apply that to the player. I tried something like:

“$PlayerCharacter.head.rotation = spawnpoint_node.get_rotation_degrees()”

but that doesn’t work properly it only turns my character up to 45 degrees and anything above 45 degrees locks it to I think 135 degrees.

Is there an easy way to do this? Maybe retain the player rotation when entering the door?

Thanks!

rotation in code is made in radians, not in degrees, try:

“$PlayerCharacter.head.rotation_degrees = spawnpoint_node.get_rotation_degrees()”

Thanks for the reply, the issue still remains after trying your code however, see linked video:

Example

I don’t understand why it only works up to a certain degree and then locks it to an angle, very strange. If you need any of the code, just let me know.

If you can share the project i can take a look in code to try find the cause

I’m so sorry, I apparently changed the one I had correct instead of the one that was wrong, thanks for the solution, but sorry for wasting your time a second time lol.

Haha don’t worry, what matters is the problem be solved