I have multiple Cameras on a Player scene,not able to call the Camera method make_current ( in c# i tried MakeCurrent())

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

Same as the Title says, I had this problem multiple times and the C# variant is not always just changing the first letter big and remove the underscores.

Is there perhaps a site where i can see all C# variants? The official docs don’t seem to have everything.

If possible I would like to know how to do it in C#.

_
_
_
_
_
Code example:


private Spatial fpscamerapivot;
private Spatial thirdcamerapivot;
private bool fps_mode = true;




public override void _Ready()
	{
		
		fpscamerapivot = GetNode("FPSCameraPivot");
		
		thirdcamerapivot = GetNode("ThirdCameraPivot");

```
}
```




public override void _Input(InputEvent inputEvent)
	{
		if (inputEvent is InputEventMouseMotion eventMouseMotion )
		{
			if (fps_mode == true)
			{
				// import event to use it
				eventMouseMotion = inputEvent as InputEventMouseMotion;

```
			fpscamerapivot.MakeCurrent();
		}
```

:bust_in_silhouette: Reply From: uniquegamesofficial

Try in GDscript! Use this example but make any necessary changes…
Example:

func get_input(delta):
 if Input.is_action_just_pressed("youraction")and$yourcamera.current== false:
      $yourcamera2.current = true
 if Input.is_action_just_pressed("youraction")and$yourcamera2.current==false:
      $yourcamera.current = true

This was a simple example on how to change the current Camera by using an action. My example is for two cameras. In case you have more, just repeat the code!

Thank you very much for the answer!

If possible I would like to know how to do it in C#.

Or can I assume it is not supported for C#?

DUDE | 2021-08-05 16:33