Download

Two Questions: One on Adding Camera, and One on Spawning Objects.

Quick Background:

This is my first post; I searched this forum, Daily-motion, and YouTube for answers, but couldn’t find an exact fix. If this is a repeat thread, I apologize; please forgive me and direct me to the correct link. I have little to no programming experience, but I can understand the terminology, and I am capable of understanding what is happening in blueprints that I didn’t create (for the most part).

The Problem:

I have been trying for the last three hours to add a third camera to my game. I created a project in the Third Person Template, and I currently have the follow camera, which I renamed “ThirdPersonCamera,” attached to the boom. I also have a second camera, named “FirstPersonCamera,” and that is attached to the mesh, fixed to a socket on the head bone on the skeleton. When I press Tab, it toggles between the two cameras. I achieve this with a simple InputAction Toggle Camera (Tab) > Toggle [FirstPersonCamera] Active. However, When I try to add a third camera, it is not as simple. If the third camera [EngineeringCamera] is added to the player character’s component hierarchy, I begin in the engineering view, which I have to toggle it inactive to utilize the toggle camera input action. I added a branch [EngineerModeActive?]: True… no change observed. False… no change observed.

Since I couldn’t keep it simple, or at least not my kind of simple, I tried to create a camera pawn blueprint that consisted of a sphere mesh, a spring arm, and a camera. I also made a PlayerController for the camera, and then in the character_BP, I did a Get PlayerController > CastTo Controller > Spawn Actor [EngineeringCam_BP] > Make Transform (on the Z-axis) upon pressing the B key… that didn’t work. In fact, I don’t even think that there was a visual result at all, at least not one that I remember. My last attempt was to just make the EngineeringCam_BP a child actor in the player character’s component hierarchy, the result from that was a character with an RTS camera attached to its head, but zero mobility. Neither the character nor the camera would go anywhere, but the Idle_Walk_Run animation still played, and I still could not use my RTS camera. At this point, I thought about scrapping my computer for gold bearing parts and calling it a day, but instead, I decided to try the community.

My First Goal:

I want a first person/third person camera toggle, which I have. But, when I press ‘B’ to enter Engineering Mode (Build Mode), I want the game to turn the controls over to an RTS style camera. I would like to control the camera with - W, A, S, D - and maybe add the ability rotate the object being built. If I can get the engineering camera to spawn at or near the player, and only travel a fixed distance from that point, that would be legit because then the camera couldn’t be used to explore the entire map. Maybe I should forgo the third camera all together. Let me know what you feel about it, please.

My Second Goal:

Boarding windows! I have only theorized about this, really, without attempting it yet because I am not to sure how something like this is done. Because I wanted it to consume materials, my initial thought was to make it a part of my engineering system, but if I add an RTS camera to the mode then you won’t see the window that you are boarding up. My next thought was to set it up similar to the pickup/drop functionality in a lot of inventory systems. I visualize maybe walking up to a window, and once inside the trigger, a pop-up text appears with something along the lines of “Barricade windows?” Then the player can strike the interact key (E) to perform the action. I have watched a few tutorials on spawning objects, where a spawn area was made, and then you press a key to spawn the object(s), but those objects tend to just litter the environment. Other tutorials spawn the object at the players feet with an arrow component. Perhaps I can create a spawn area over the window, press a key to spawn the barricade at the window (without it falling to the ground), but I want it to be destructible, so do I need physics enabled? If so, how do I enable physics without my barricade dropping to the ground once spawned? What would be the easiest way to set up a barricade system?

Additional Information:

I would show you screenshots of my blueprints, but everything that didn’t work for me, I deleted; I would not be able to show you more than my camera toggle… which shouldn’t be too difficult to follow: InputAction Toggle Camera (Tab) > Toggle [FirstPersonCamera] Active. Impressed with my game yet? If not, don’t worry, the project is brand new. All of my other projects were impressive, given my background, but I eventually caused a fatal error that killed my ability to open the projects… one by one, they have all ceased to exist. If you would like more information, I’m just a post away.

I am terribly sorry for post this thread in this section… I thought I was still in the content creation section.

Well - I had the exact same issue recently over the weekend. The odd thing being is that my thirdperson/firstperson camera toggle works fine in the standard 3rd person example map, but not in my new map. Everything else is exactly the same, but the toggle will not fire-up on the new map. No display errors after compiling. So something is definitely missing somewhere.

My blueprint command is: Event key 1, linked to Toggle Active (target actor component), the target is my FPScam moved up from CameraBoom to Mesh(inherited). All socks are good and linked to parent socket.

Any help would be greatly appreciated.

Wondering if this might be a Windows 10 issue 64 bit?

Cheers

That isn’t the issue because I’m using Windows 8/64 bit, and it gave me problems too. What I do is create a new folder for my maps, and then with the example map loaded, I save a few duplicates with File > Save As > Folder Location > (MyLevel1; MyLevel2; MyLevel3…)

That way you’re always building off of the template, and not a completely new level.