I'mm designing a squared tiled map in 3D. To know the translation
of each tile, I want to use a CollisionShape
and an Area
to print
that vector when clicked.
In the experiemental/test scene, it seems to work, but not in the main scene of the game. I put a video here so you can see what I mean: YouTube video
Here I put the code of the tile:
extends Spatial
func _on_Area_input_event(_camera, event, _click_position, _click_normal, _shape_idx):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
print(translation)
I forgot to show in video, but in Remote, all the CollisionShape
s are in the right place and have a Shape
:

The only node that uses inputs is the camera I created, but in the proof scene everything works fine.