Godot Version
4.2.2-stable
Question
I’m a complete beginner in this game making industry, and learning from a tutorial I saw on YouTube. One of the steps say to spin an object you have to use the internal function of “rotate_x()”, and use "rotate_x(rad_to_deg()). However, I found that the speed of the rotation changes with the max FPS (in Project Settings). Is there any way to spin consistently without having to lower the max FPS?
My Code:
extends Area3D
const ROTATION_SPEED = 2 # Number of Degrees the Coin rotates every frame
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
rotate_y(deg_to_rad(ROTATION_SPEED))