Hello Unreal Community,
I’ve got a lot of questions about c++ programming in Unreal Engine regarding my own first steps as well as the StrategyGame example and I would really appreciate it a lot if anyone could take the time to at least respond to a few of my questions. I really wanted to figure it all out on my own but after about two weeks of not understanding the engine at all I decided to ask you guys for help. Below are the questions. I know it’s quite a lot and I understand if you do not want to respond to them in a detailed fashion. It would help if you would respond with one word so I can do the googling. I am really motivated and not lazy so any help is appreciated and I am willing to do the research.
-
So I’ve got my SpecatorPawn and I want to move my Camera in an RTS style. I bind the function and move it with “AddMovementInput”. Unfortunately this only works after I select the spawned instance of my SpectatorPawn inside the editor. So what I do is I enter playmode and press w for moving forward. Nothing happens with my view but weirdly enough my actors position changes. After I select the SpectatorPawn inside the Editor and then go back into playmode the movement works like intended but it only works with the Input after I reentered. So although my position could be 3000 on an axis, a value like 3300 would only give me the effective location of 300.
Here (Imgur: The magic of the Internet) you can see two screenshots. The first I zoomed out for like 1 sec and then tabbed out -> selected the pawn. And the second one I was scrolling for like 5 seconds before tabbing out and selecting it. Before selecting the pawn the Viewport view stays at 0/0/0. So I am essentially seeing grey until I select it and then move the camera. -
Since I am trying to create an RTS game, do I really need AIController for every single unit?
-
Is my basic setup viable for an RTS? I am planning on handling Unit selection as well as movement commands inside my SpectatorPawn and having my Units as Pawns without Controllers. Or do I need to handle it inside my PlayerController? I was leaning more towards not handling it inside my PlayerController because I thought that you only need the Unit selection stuff if your SpectatorPawn exists. For every other scene like MainMenu where you do not have the SpectatorPawn you wouldn’t need that.
-
In Epic’s StrategyExample project you can see stuff like “Team” handled in an interface instead of a variable. What would be the advantage of checking an Actors Interface instead of one of his Variables which might as well contain a team reference?
-
I am also planning on having a “SelectedUnits” List inside my PlayerController for multiple selection and movement. Is this the best approach?
-
My attached camera always starts at 0/0/0 world cords. If I move up my playerstart it changes the Actors position but the camera gets a local offset so it ends up being at 0/0/0 again.
I’ve got plenty more questions but I don’t want to be lazy and annoy you all with my stupidity
Thank you for your help and excuse my sloppy English (foreigner)
PS: No idea how to
in this forum