Files
godot-build-action-example/Swift/Sources/Logic/Nodes/PhysicsRotator.swift
T

21 lines
386 B
Swift

//
// PhysicsRotator.swift
// Logic
//
// Created by Alex Loren on 8/26/26.
//
import SwiftGodot
@Godot
class PhysicsRotator: AnimatableBody3D {
// MARK: - Properties
public var axis: Vector3 = .zero
public var speed: Double = 5
// MARK: - Functions
public override func _physicsProcess(delta: Double) {
rotate(axis: axis.normalized(), angle: speed * delta)
}
}