Transform3D Does Not Contain a Definition for 'Basis'

I'm coding in C# for a Godot game. Since there aren't many tutorials on C# I'm trying to figure how I can translate this function from gdscript:

func _physics_process(delta):
    if shoot:
        apply_impulse(transform.basis.z, -transform,basis.z)

So far my bet was:

public override void _PhysicsProcess(double delta)
    {
        if(shoot)
        {
            ApplyImpulse(Transform.basis.z, -Transform.basis.z);
        }
    }

Again, the documentation doesn't help me enough to figure this error:

'Transform3D' does not contain a definition for 'basis' and no accessible extension method 'basis' accepting a first argument of type 'Transform3D' could be found (are you missing a using directive or an assembly reference?)

Any help or links to documentation that might guide me would be greatly appreciated.

2
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article