I am using Godot 4.1. I want to add a property via a script export to my node3d that has translation and rotation tools in the inspector, exactly like a Node3D's existing Transform property.
This is what I want to achieve:
Precisely, I want an X, Y, Z position field, followed by a X, Y, Z Rotation field (ideally with the little sliders too). I would not mind also having the Scale, Rotation Edit Mode, etc either, if it makes the solution easy to achieve.
I have tried adding a Transform3D, but that exposes a transformation matrix, which is not the desired control:
How can the desired controls be achieved?
@export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_greater,or_less,radians") var rotation : Vector3;
This would be the most recent method of doing this, I am unsure when this was added but it works in 4.4. Adding this answer incase anyone is still looking for good ways to replicate the rotation transform.
It does automagically change the values from degrees to radians under the hood just the same as the transform settings for nodes do.