Generates a Godot scene from Node
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// NodeRotator.swift
|
||||
// Logic
|
||||
//
|
||||
// Created by Alex Loren on 8/26/26.
|
||||
//
|
||||
|
||||
import SwiftGodot
|
||||
|
||||
@Godot
|
||||
class NodeRotator: Node3D {
|
||||
// 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user