Is there a movable node I can create that will help me set points for a scene in 3D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GaryParkin

I’m working on a simple elevator created from a flattened cube attached to a Path3D, PathFollow3D then the RigidBody3D that moves up and down.

The Path3D has points that you can move around, mine are set at 0,0,0 and 0,3,0.
The second one is 3 units higher so when the game starts it moves the RigidBody3D (elevator) up 3 units on the Y axis depending on the speed i set in the PathFollow3D’s progress.

@export_range(1, 10,.25) var totalLoopTime: float = 2

The 2 Points I connected to the outside world as:

@export_range(0, 10,.25) var pointOne: float = 0
@export_range(2, 10,.25) var pointTwo: float = 2

This all works but I’m coming from Unreal engine and they give you a movable 3D node that you can move around in 3D space to set the points (in editor time not run time).

Does Godot have anything I can set up so I can drop my elevator into the main scene and adjust the points with the mouse before running the game?

In Blender, these would be called Empties.

My whole scene:

extends Node3D
@export_range(0, 10,.25) var pointOne: float = 0
@export_range(2, 10,.25) var pointTwo: float = 2
@export_range(1, 10,.25) var totalLoopTime: float = 2
@onready var path: Path3D = $Path3D
@onready var pathFollow: PathFollow3D = $Path3D/PathFollow3D

var currentPathTime: float

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	currentPathTime += delta
	if pathFollow.progress <= 100:
		pathFollow.progress = currentPathTime / totalLoopTime
:bust_in_silhouette: Reply From: zhyrin

You can use a Node3D for any spatial positioning, but more specifically there is Marker3D which renders an axis gizmo like a blender empty would (only in editor).
When your level starts, you can reference the marker and set the uppoer position based on that, or you can make the setter behaviour a @tool script, that way you can update in the editor in real time.

Thank you for the quick answer. Let me mess with this for a bit and I’ll see how this works. I was sure Godot had something.
(It’s hard being a convert from UE) :slight_smile:

GaryParkin | 2023-03-01 13:30