godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.97k stars 3.23k forks source link

No constructor for basis as a copy of another basis #10148

Open TempusFugit05 opened 1 month ago

TempusFugit05 commented 1 month ago

Your Godot version: 4.3.stable

Issue description: There is no actual constructor to create a basis from another basis.

URL to the documentation page: https://docs.godotengine.org/en/stable/classes/class_basis.html#class-basis-constructor-basis

tetrapod00 commented 1 month ago

It works in GDScript:

func _ready() -> void:
    var original: Basis = Basis.IDENTITY
    var copy: Basis = Basis(original)

Are you using C#? The equivalent is:

    public override void _Ready()
    {
        Basis original = Basis.Identity;
        Basis copy = original;
    }

The docs should probably note that this constructor is only available in GDScript.