Say you want your 2D physics object to freely rotate, but want a 2D sprite child to only display at a limited subset of the degrees, like instead of showing every 1 degree of rotation, the sprite would only show every 15 degrees of rotation?

Can this be achieved with RemoteTransform2D or is a shader needed or something else?

cheers

Since I haven't used RemoteTransform2D or custom shaders, I would attach a script to the sprite with a _physics_process() method that rounds the sprite's rotation (or global_rotation?) property to the nearest 15 degrees.

This example uses global_rotation:

func _physics_process(_delta: float) -> void:
        const ANGLE: float = 15.0 * (PI / 180.0)  # 15 degrees in radians
        # Round to nearest multiple of ANGLE.
        global_rotation = ANGLE * roundf(global_rotation / ANGLE)

Thanks for the suggestion, I'll try it

I have a pretty simple square crate, all transforms at 0,0, but when I try this it's wonky:

extends RigidBody2D
func _physics_process(delta):
    $Sprite2D.rotation = rotation

I must be missing something obvious...

Never mind it was global_rotation like you suggested 😃