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

Related questions 901 The located assembly's manifest definition does not match the assembly reference 2081 How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning? 1737 What does the [Flags] Enum Attribute mean in C#? Related questions 901 The located assembly's manifest definition does not match the assembly reference 2081 How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning? 1737 What does the [Flags] Enum Attribute mean in C#? 948 If a folder does not exist, create it 1 How to get BlendSpace2D states from AnimationTree node in Godot using C#? 198 IConfiguration does not contain a definition for GetValue 4 How can I detect mouse input on an Area2D node in Godot (viewport and shape_idx error)? Load 4 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.