Apparently, this code is frame dependent:
extends Node3D
var spin := Quaternion.from_euler(Vector3(10, 10, 10))
func _process(delta: float) -> void:
*= spin * delta quaternion
This is because spin
is a
Quaternion
, and multiplying it by delta
only does a component-wise multiplication. It makes
sense to me that a component-wise multiplication
would not do what I expect here, since the
individual quaternion components do not really
represent a rotation in a particular direction.
In order to scale the rotation, I have to use
slerp
. For example:
func _process(delta: float) -> void:
*= Quaternion.IDENTITY.slerp(spin, delta) quaternion