Final Camera - Camera System

OK, I got this working now.

I added a new variable (not a preset variable, just a regular one for the Manager itself) called DeltaSeconds, default at 0. Every iteration of the smooth rotation function increases DeltaSeconds by the GetWorldDeltaSeconds. In the Alpha node on the Lerp, I take the max of either the constant or DeltaSeconds divided by 2. And next to the nearly equal node that decides whether to set the rotation immediately, I added an OR with the check to see if DeltaSeconds >= 2. I could change that 2 to a constant that can be set at class defaults but I figured hardcoding 2 was fine for now. When it does hit two seconds and sets the rotations to be equal, it will also reset DeltaSeconds back to 0.

This makes it so that it will speed up the Lerp but after two seconds it will lock. Because of the speed up, it doesn’t look like it snaps when it hits two seconds.

Also, that rotation offset I added only looks good for certain distances. I think I’m going to have to do the raycast thing to get the perfect rotation offset on preset switch. It shouldn’t be too difficult to do with the Find Look At Rotation node.

Another point is that I had to move whatever happened in the Manger’s BeginPlay event into a custom event due to multiplayer. Depending on latency, sometimes the camera wouldn’t “attach” properly to the pawn. With the custom event, I am able to call it after the pawn is possessed by the controller (OnPostLogin event in GameMode), which should guarantee that the camera gets attached.

Once I am finished, if anyone is interested, I can create a video of what my camera switch looks like in game.

Hi ToxinGaming, I’m interested.

My game utilizes multiple perspectives and I’m using FinalCamera to transition smoothly from Top/Down -> Third Person -> Over-The-Shoulder -> Full Bodied First Person –> First Person Arm & Weapon (Mouselook) -> Full Screen First Person -> Curson/Reticle Only. The planned control scheme is to allow decoupling/coupling auto/manual control of Camera Rotation, Body Arm Animation, Body Directional Movement, and Cursor Movement. The video below shows my progress.

@indygoof, I’m trying to wrap my head around the theory of operation for FinalCamera to extend and modify for my purposes above. I’ll glady accept any technical documentation/explanation on the system.

For extending/modifying ot yourself, the actual documentation is the Blueprints with comments itself. Most of the comments should make sense and put you in the right way. I think the easiest way to start extending it is, what do you want to do? Then i could just point you to the right directions.

Please also note that i usually answer to any emails i get and try to help people as good as i can, even if its not directly related to the asset.

Cheers,

I desire to decouple the First Person Camera on-demand from the Body for independent control of camera rotation and body direction of movement. In my game, a feature is to allow the Player set a Location Target (by various means) in the World, in which the Character’s body navigates automatically, allowing the player to rotate xyz the head (camera) freely to look up/down, side-wards, behind themselves and control their Arm/Weapons independently while in motion. This ‘FreeCam FP’ control scheme is also to prep for VR support.

The Player can switch between the standard Mouselook FP, Full-bodied FP, and FreeCam FP anytime during game play. In fact, my goal is to offer a wide range of control and First Person ‘vantage points’ (with third-person perspective benefiting from these features). Thus I’m implementing systems for both manual and automated controls for independent Camera Rotation, Body Arm Animation, Body Directional Movement, and Cursor Movement.

I was expecting the Full-body FP Mode to support this, but, I need a understanding of how its working to bend it to my will. I’ve made a few changes in the input controls to switch between perspectives. What I noticed is some sort of delay movement is needed for the Camera to ‘lock’ with the body in First Person. I believe I’m at fault. FinalCamera handles smooth transitions between each perspective wonderfully, this is the reason I purchased the product and it should be a highlighted feature in the Marketplace, IMO.

Hi TechLord,

This should already be perfectly possible; though in in the full body mode there is still the rotation of the camera synced with the player char.

If you want both to be completely independent, just disable any “Rotate with Player Yaw” and similar. Afterwards the rotation will be only controlled by the mouse or whatever you make the axis input.
In fact its the same also for the RTS / TopDown Camera, it is simply completely independent from the player character itself, but of course you can attach the camera still to any object/character to follow.

Nope, gotta be honest and this is my fault. I will implement a better solution with the next update, similar to what i suggested to ToxinGaming with speeding up the lerping through the DeltaTime.
If you need this faster, i can implement it and send you a download link for the most current version directly.

Cheers,

I appreciate the advice. If the update will be available in Marketplace Update, I can wait. Otherwise my email [EMAIL=“frankie_taylor@hotmail.com”]frankie_taylor@hotmail.com.

OK, I was able to implement the custom rotation. You can see a GIF of my progress here and here.

My additions to the code are a bit hacky as there is no on/off switch for this. Here they are:

First was to do a line trace on preset change and save certain variables. This happens on the 0 output on the Sequence node in the Event Graph. After the Hit Result Impact is set it goes on to what it normally is supposed to go to (Rotate With Player block).

I had to add another pin to the Sequence node and call a new function.

camManagerGraphSequence.PNG

Here is the new function. I have create a new variable called Impact Rotation and will set it appropriately in order to get the right rotation it needs to go to.

Finally in the Calculate Camera Rotation function, I added the Impact Rotation into the return values for Pitch and Yaw.

Hopefully this works for you. If you have any questions, just send me a message.

Hi,

I just got your camera system and I’m getting it into my project. Its going well. Its a good system. I like how you set everything up. One thing I have a questions about. I saw you say around 4.11 you added a swipe/drag to move system. Was that the Axis Scrolling function? Maybe I’m just missing it. It’s not quite what I’m looking for. I’m looking to set something up that’s a little different. I want to have a RTS style scrolling but set it up by click and drag. (so you would click anywhere and hold down, then you could drag moving the camera until ‘MouseUP’) some systems create speed and direction based on how far you get from your click point. That’s cool, but I would be happy with simply dragging the camera location like you see on a mobile device. It seems like I would need to inject a new location into the “Current Location” variable. Is that in your system currently and I’m just missing it? If not, any thoughts on setting that up would be great.

Thanks!

Hey,

the swipe/drag thing was not really something in the direction of mobile RTS but more like the old mobile Epic Castle Demo (if you know that one), so its mostly “touch to move” and “swipe to look around”.

But what you need isnt too complicated (i think), i could implement it this weekend and then send you an updated package directly if you want.

I would only require that you send me a mail with the receipt you got when buying the asset (as a proof-of-purchase). Just to be sure: office@indygoof.net

Cheers,

Is there a way to have the player spawn in a specific location vs what seems to be random depending on where I move the editor viewport?

Uhm, not sure if i understood the issue correctly, but just place a PlayerStart in the level if you want to spawn it at a specific point.

Cheers,

Heh Thats what I was missing … doh :slight_smile: thanks for the quick response. I have another question. Using the TopDown camera and am looking for where you set and mod the camera pitching. Currently its set for roughly a 20 degree up or down which then goes back to the default if you do nothing. What I would like to do is change it so the 20 degree becomes more a 40 degree and that it stays there instead of going back right away until roughly 20 seconds of no action go by.

Oh and any news on the Landscape architect? :smiley:

Thanks!!

Thats what the Camera System is actually made for. If you open up the FinalCameraManager Blueprint (located in “FinalCamera\Blueprints\FinalCameraManager”), you will see the details-pane on the right side. Search for “Final Camera Presets” and find the preset with the name topdown:

Here you can modify the “initial rotation” (this is the camera rotation) and many other things.

Also, for some basic stuff on FinalCamera, check this page

I guess you mean Ali Akbar and his Landscape architect thread

Cheers,

Regarding fps mode in 4.16 - how exactly do I make the FPS preset like a proper first-person camera? The mouse keeps getting stuck on the edge of the editor window while playing the demo (not to mention the mouse cursor stays active) - this stops me from turning or looking up all the way etc.

Sorry for the wait time, i was on vacation over the weekend.

The demo is meant to give an overview over the possibilities; Not everything in UE4 can be changed elegantly during runtime, so of course some settings are a bit limited.

You could have a look at the “TrueFirstPersonPC” in the subfolder "SamplePlayerControllers. The difference to a normal Playercontroler is mainly, that you have your whole-body-mesh all the time instead of just the hands (and some tweaked settings for the camera itself).

If you want to build your own PlayerController make sure that:

  • In the PlayerController defaults, check that “Show Mouse Cursor” is disabled
  • check that in project settings, in “input settings” you have something like

If you need any more help, dont hesitate to drop me a mail.

Cheers,

There are a few properties that you should check

Oh I see, thanks very much. I get it. I was messing around with the system while still in that “tutorial” mode :slight_smile: