Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Ariel Gimenez |
Anyone know how to do this in Godot c #.
I want to detect the mouse input as follows, but I can’t find the solution.
Alguien sabe hacer esto en Godot c#.
osea quiero detectar el input del mouse de la siguiente forma,pero no puedo encontrar la solución.
In Godot Gdscript working
func _input(event):
if event is InputEventMouseButton:
if event.button_index == BUTTON_RIGHT and event.pressed:
pass
In Godot c# no working
public override void _Input(InputEvent @event)
{
if(@event is InputEventMouseButton evento)
if(evento.Pressed && evento.ButtonIndex == BUTTON_RIGHT)
{
}
}