Help with Inputs, please!

Hello. I’m currently experiencing some troubles to get the results I want, so please someone help me.

I’m having this issues:

  • I created a manager that provides the inputs for two pawns. However no inputs work as intended.
    iI have three classes (Cam Manager, RTS Camera and Game Pawn). My manager controls in two TArrays the number of cameras and game pawns. What i want is for manager to set the inputs of both the other classes,and for a given pawn to be controlled but it isn’t working.

  • I can’t seem to get how to move a pawn towards the mouse direction…
    What I want to do is to move my camera pawn towards the direction the mouse is in the viewport. Like this:
    If I move my mouse to the right edge of the screen/viewport, I want my spectator cam to move in that direction, but I don’t understand how to do it.

  • I don’t understand how to zoom in and out with my cameras.
    What I want here is to simply alter the length of a spring arm using the mouse scroll (Scroll Up to zoom in and scroll down to zoom out). I think I’m doing it wrong and I wanted to know hot to do it

Please, help. It’s for educational purposes and I can’t get it to work.

Here are some code bits:

UCLASS()
class PRACTICE_API ACamManager : public APawn
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	ACamManager();

protected:
	// Called when the game starts or when spawned
	virtual void		BeginPlay() override;

public:	
	// Called every frame
	virtual void		Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void		SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

	// Functions
	// Change perspective to either RTS or action
	void				ChangePersp();
	// Add a spectator cam to the world
	void				AddCam();
	// Remove a camera from the world
	void				RemoveCam();
	// Switch from the current camera to the next camera on the list
	void				SwitchCam();

	// Check if we passed a camera before starting the game or need to create one
	void				CheckInitialCam();
	// Display controls on a debug message
	void				DisplayControls();
	// Display messages of the world
	void				UpdateMessagesDisplay();APlayerController* OurPlayerController;

// Members
// Defines if the active mode is RTS (true) or ACTION (false)
bool				m_RTS;

// Camera index number, used to create cameras with an identifier
uint32				m_CameraIndex;
uint32				m_PawnIndex;

// Blending time to pass from active RTS cam to pawn cam 
UPROPERTY(EditAnywhere)
	float			PerspectiveBlendTime;

// List of RTS cams existing in the world
TArray<ARTS_Cam*>	m_RTSCams;
// List of selected pawns
TArray<AGamePawn*>	m_SelectedPawns;

// Initial cam
UPROPERTY(EditAnywhere)
	ARTS_Cam*		InitialCam;

UPROPERTY(EditAnywhere)
	AGamePawn*		InitialPawn;

ARTS_Cam*			ActiveCam;

UPROPERTY(EditAnywhere)
	AGamePawn*		TestPawn;
};