Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | IranosMorloy | |
Old Version | Published before Godot 3 was released. |
Hey all.
I have a problem. I’m a beginner programmer. I’ve created a node for player, wrote down the movement, then added another node for GUI. The problem is that the game is board game, player can rotate in any 2d direction and everything else is rotating too, even the GUI.
The question is: how to quit the players movement so the GUI, etc. that should not rotate, won’t rotate?
The code I used for rotating the player_ship is:
if Input.is_action_pressed("btn_A"):
set_rot(get_rot() + delta * rotation_speed)
if Input.is_action_pressed("btn_D"):
set_rot(get_rot() + delta * -rotation_speed)
Rotation speed is exported var. If I reparent the GUI from the player’s character to just node2d called player, the GUI is not moving at all. Any hints/advices?
Thank you in advance!