Godot 3.1 (Windows10)
I have simple 3d object that I instantiate in main game many many times to get grid like structure. Goal is simply to return 3d object from mouse click so I can get clicked grid cell info.
Googling godot 3d view mouse click handling gives very confusing and old answers but I manage to get it almost working.
My clickable ghost 3d object structure:
---Collision shape (just a box)
Static body has a script:
func _input_event(camera, event, click_position, click_normal, shape_idx):
if event is InputEventMouseButton:
print("Mouse Click/Unclick at: ", event.position, " shape:", shape_idx)
Works kind of ok and click is pixel perfect in 3d world but always return 0 as shape index.. does that represent just that my ghost object has one collision shape and its index is 0?
How to get info which ghost object instance from 25 or so I actually clicked?