[email protected]
Level Design Portfolio
  • HIGHLIGHTS:
    • Camera
    • Collaborations
  • The Long Dark
  • World Design

Telling stories through captivating gameplay.

Warning, this is a construction zone!

Flip through the tabs above to view Open Worlds and other Level Design works I've been crafting since 2014.

Or click the red button
to review my professional work as a Game Design generalist.

Fast Travel to Game Design

Real-Time Cameras in Unreal Editor 4 - Part 7

6/8/2014

4 Comments

 
Reference: Mark Haigh-Hutchinson. 2009. "Real-Time Cameras: A Guide for Game Designers and Developers." Elsevier.

I have made a small step forward by implementing a world-relative control reference frame in Unreal Editor 4. The player can rotate the camera around the character without changing the forward direction on the control pad. Unfortunately, I have had to disconnect the automatic turning of the character mesh with the controller, and then hook it up again sloppily for now. I won't be sharing the Blueprint section that controls the current facing direction of the character mesh, and will also hold back from releasing any tutorials until I have got this section at a more polished stage. Until then, I will push on with the goals I described in Part 4 and share my progress with you - but first a camera design guideline from the resource above:
  • "Attempt to keep the player character in view (third person cameras). Total occlusion by geometry or other game objects (or alternatively, view frustum culling) of the main player character will disorient and confuse the player, yet surprisingly few games pay attention to this essential point. Note that this does not necessarily mean focus on the player character directly, nor does it mean that partial or temporary occlusion is not permissible."

Picture
Allows the right control stick on the gamepad to swing the camera around the character
This Blueprint gives us a basis for the right control stick camera controls. It works by combining the yaw input from the controller with the current spring arm rotation and moving the spring arm to this new rotation. If the Project Settings >> Input axes are set up correctly, this will rotate the camera clockwise (from a top down perspective) and cause the camera to look to the right of the character when the player pushes the right control stick to the right. However, holding in that direction will continue to spin the camera clockwise until it is is front or even to the right side of the character. Releasing does not return the camera to the original state, and the player must use left and right rotations to bring the camera to a neutral state.
Picture
Neutral state
Picture
Temporary result of holding right on the right control stick
Here, the movement directions remain the same regardless of where the camera is pointing. While this is not the end goal, it is the first step of breaking out of the screen-relative scheme we got stuck in during Part 3's experimentation. The scheme is world-relative because pushing forward on the left control stick will always move the character in the same direction relative to the world and not relative to the camera. Many games force the player to adjust the direction that they point their right control stick as they make camera adjustments with the left control stick if they want to continue going in the same direction (e.g. Hitman series). The end goal of this project will exhibit behaviour that is more similar to our current control scheme than to Hitman's screen-relative scheme. We have to make one notable alteration to the Details of the CharacterMovement Component (when compared to the Blueprint Third Person example) to permit this behaviour. The Boolean variable bOrientRotationToMovement should be set to false, so that we can control the facing direction of the character independent of the camera orientation. Then Movement input must be updated as follows to create persistent movement directions. Note that the character mesh will be stuck facing forward and must be rotated manually from now on.
Picture
Movement Adjustments - ignore the Sign (Float) and SET nodes for the purposes of our discussion
This world-relative scheme always has the same Forward and Right vectors. Therefore, they can be set using the (1,0,0) and (0,1,0) unit vectors. The gamepad just needs to take the value of input in these axes and the move the character in the world direction associated with them. Since this project is not focused on movement and character orientation, I have not put much polish into the Blueprints that decide where to rotate the character based on right control stick input and will avoid showing them for now, but I will share the sections that apply these adjustments to the character in each frame.
Picture
Applying new turn values to the character's current look at rotation
The current look at rotation is a helpful tool that allows us to take the mesh's forward vector and ignore the [ROOT]CapsuleController and CharacterMovement components. We create a vector representing the current movement input at the appropriate height in world coordinates and make that the look at target from the start position of the character at this moment. The pitch and roll do not need to be altered yet, but we want to change the turn value for yaw so that the character mesh can be rotated accordingly. The add function allows us to add the variable Turn Value, which is calculated in the part of this Blueprint I have chosen to withhold, as well as a correction factor of -90 degrees. This correction factor is specific to the mesh and relates to the rotation applied to the model to get its intended forward facing side aligned with the forward vector of the [ROOT]CapsuleComponent. The next step is to apply a smooth linear interpolation using "RInterp To."
Picture
Setting World Rotation of the Mesh - Flow passes from Event Tick through unshared sections of the Blueprint to Set World Rotation
First, we create a new rotation based on the unchange pitch and roll combined with the altered yaw input. This is our target rotation for our interpolation. The current rotation comes from Get World Rotation of the Mesh component. Here, Delta Time comes from Event Tick and the Interp Speed was tuned quickly in the Event Graph, although this could be done much more effectively using "Promote to Variable" and setting a default value for this variable in the Defaults tab.

I will be cleaning up this camera system as I push on to new objectives, the next of which is to offset the camera's focus from the character to a position directly in front of him.
4 Comments
Project Loan link
12/4/2016 10:36:53 pm

Really this blog keeping an unique as well as appealing information.Thanks for show us. Keep it up.

Reply
www.ukbestessay.net link
9/6/2016 10:48:53 pm

Good quality cameras are important for the coverage because it need a very quality camera. I am impressed the way you write your articles on the quality cameras. Thanks for sharing these information with us.

Reply
cash advance link
18/2/2017 06:26:10 pm

The greater part of the allow cash accessible is as up front installment help. This cash does not need to be reimbursed. The cash to pay down on your new home is given by the give. This can go far for those borrowers who can bear the cost of regularly scheduled installments however don't have the way to manage the cost of an up front installment to hold the home.

Reply
best resume writing services link
23/2/2017 02:20:14 am

I don't saw for a long time an AAA project made on Unreal engine . This is obsolete technology.

Reply



Leave a Reply.


    James Dodge

    Level Designer

    View my profile on LinkedIn

    Categories

    All
    CameraAnalysis
    CameraDevelopment
    GlobalGameJam
    Photoshop
    TombRaider


    Archives

    October 2021
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    October 2016
    September 2016
    June 2016
    May 2016
    March 2016
    February 2016
    August 2015
    July 2015
    March 2015
    February 2015
    December 2014
    September 2014
    August 2014
    July 2014
    April 2014
    January 2014
    December 2013
    November 2013
    October 2013
    August 2013


    RSS Feed

Site powered by Weebly. Managed by Bluehost