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:
class PRACTICE_API ACamManager : public APawn
// Sets default values for this actor's properties
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick(float DeltaTime) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
// Change perspective to either RTS or action
// Add a spectator cam to the world
// Remove a camera from the world
// Switch from the current camera to the next camera on the list
// Check if we passed a camera before starting the game or need to create one
// Display controls on a debug message
// Display messages of the world
void UpdateMessagesDisplay();APlayerController* OurPlayerController;
// Defines if the active mode is RTS (true) or ACTION (false)
// Camera index number, used to create cameras with an identifier
// Blending time to pass from active RTS cam to pawn cam
// List of RTS cams existing in the world
// List of selected pawns
// Initial cam
Aug 14 '17 at 06:53 AM
in C++ Programming