Usin signal InputEvent with csharp not working

Godot Version


Hi there, I don`t understand why I have an error with this signal…
with gdscript works fine:

extends RigidBody3D

func _ready():
connect(“mouse_entered”, OnMouse)
connect(“input_event”, OnEvent)

func OnMouse():

func OnEvent(cam:Node, event:InputEvent, position:Vector3, normal:Vector3, shape_idx:int):

but no in csharp, my guess is that the class InputEvent has the same name than the signal??

public partial class Dice3D : RigidBody3D

public override void _Ready()
MouseEntered+=OnMouse; //this works ok
InputEvent+=OnEvent; //this is an error

public void OnMouse(){

public void OnEvent(Node cam, InputEvent myEvent, Vector3 position, Vector3 normal, int shape_idx){


Any idea?


Does it work with long instead of int?

That’s was the problem, fantastic thanks, but I can’t understand why this should be different with gdscript…

Thanks a lot again

1 Like

Int in gdscript is 64 bits, it’s a bit unclear in the docs :slight_smile:

See here