How do I easily tie the mouse input to the right stick?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bogans_Run

New to GDscript and coding in general, got a basic FPS working with a captured mouse but it’s mainly what I got from tutorials and I’m trying to figure out how to directly tie that mouse function to the right thumbstick so I can easily use that input for menus.

This is what I made following some video.

if _event is InputEventMouseMotion:

		camera[0].rotation.x += -deg2rad(_event.relative.y * sensibility);
		
		camera[1].rotation.y += -deg2rad(_event.relative.x * sensibility);
	
	var max_angle: int = 85; # Maximum camera angle
	camera[0].rotation.x = min(camera[0].rotation.x,  deg2rad(max_angle))
	camera[0].rotation.x = max(camera[0].rotation.x, -deg2rad(max_angle))

So I want to understand how to add this behaviour to the right stick.

Does not cover in the slightest how to get the right stick to replace the Input event for the mouses motion. It only describes the InputEventMouseMotion, not how to replicate it on the stick.

Bogans_Run | 2022-03-24 15:57

but thanks anyway

Bogans_Run | 2022-03-24 15:57