hi,

how can i get the MousePosition.x in VisualScript aka: get_viewport().get_mouse_position().x

Welcome to the forums @0TheRiddler0! Maybe this video will help:

Thanks

but I do not see what gives me in the video only the X coordinate

in GDScript i can write: position.x = get_global_mouse_position().x

ps. i am a beginner in VisualScript

Here's the documentation page for deconstructors in Visual Script for Godot, which shows how to take a Vector2 and split it into X and Y: Godot Documentation

2 years later