How do I enable/disable debugging?
You can toggle the Camera Modifier debugging by calling the following function with Enabled set to true or false.
This prints all sorts of useful information on your screen
You can also enable/disable debugging for each modifier individually, by going to the Class Default of the modifier and checking or unchecking the Debug checkbox, e.g.:
I’m getting some jittering after integrating into my own project?
Jitter usually comes from either an incorrect setup (make sure you didn't miss any steps in the tutorials) or from trying to integrate UGC with a pre-existing camera feature or system.
Cameras in videos games are very delicate and setting their properties from multiple places in code results in weird behaviour, especially jittering.
Make sure you're not modifying any camera properties, such as FOV, Socket Offset, Target Offset, Target Arm Length or Control Rotation, outside of the UGC plugin.
In order to do this, please follow the next steps:
Open the Tools tab and open the Find in Blueprint window.
Use this to look for all places where your code modifies FOV, Socket Offset, Target Offset, Target Arm Length or Control Rotation, outside of the UGC plugin.
Otherwise, if there is a feature in UGC that you think is conflicting with your system and you want to remove it, you can go to your new player camera manager blueprint and remove its corresponding Camera Modifier from the class defaults (See “How do I remove a feature I don’t need?”).
I want to modify property X on the camera/spring arm in runtime but it doesn’t work?
As said before, Cameras in videos games are very delicate and setting their properties from multiple places in code results in weird behaviour, especially jittering.
👉Make sure you're not modifying any camera properties, such as FOV, Socket Offset, Target Offset, Target Arm Length or Control Rotation, outside of the UGC plugin.
👉NEVER try to modify these properties directly. All your requests should go through the BP UGC Camera Manager class which has a lot of helper functions for most of your needs.
👉The preferred method is and always will be to change the properties with Camera Data Assets (see ). Especially if the values are state-dependant (like wanting to have a set of camera values active when crouching, and different ones when doing traversal; etc). 👉Keep in mind that some modifiers override some camera properties every frame (like the , among others) so your requests might get ignored. If this happens to you, consider either disabling the modifier in question if you don’t need it or making a new UGC modifier with a lower priority so it can override the properties set by the previous modifier. Finally, if there is a feature you want to add to UGC where you need to dynamically modify one or more properties in runtime either on the camera or on the spring arm component, you need to add a new UGC Camera Modifier which handles this logic.
Create a blueprint class inheriting from BP_UGCModifierBase.
In the overrideable functions, look for the one that allows you to change the camera property you’re interested in
Make sure to call the parent function
Make sure to return the correct value
Setup the priority of the modifier correctly in Class Defaults.
Modifiers run sequentially from the priority 0 to priority 255 (0 is the highest priority).
If you have another modifier that overrides the same function as your new modifier, you need to think about which one of them should be executed first.
For example: The modifies the Target and Socket Offsets of the spring arm component and has a priority of 120. This means that any Modifier with a priority number less than 120 will get executed first and get its values overridden by the UGC ArmOffsetModifier because it gets executed later due to its “lower” priority. This might seem counter-intuitive but it is the way the Camera Modifier system works in UE. Add the new modifier in your Camera Manager class’s DefaultModifiers array
How do I remove a feature I don’t need?
Go into your new UGC Player Camera Manager child blueprint, and click on Class Defaults.
In the list of Camera Modifiers, remove the one that you do not wish to use.
I can’t rotate my camera with the mouse/gamepad?
Make sure UsePawnControlRotation is set to true in the Character’s SpringArmComponent
How do I use Cinematics with UGC?
Unreal Engine allows your cinematics to transition from/to gameplay (). If you have enabled CanBlend in your Camera Cut’s properties, you also need to enable LockPreviousCamera in the camera shot properties.
All foliage gets dithered at once?
You can use MF_CameraDithering_Circle which uses a circular dithering style
⚠️ If you use circular dithering, you will need to enabled UpdateMaterialPlayerPosition
How do I make the camera rotate with Blueprints?
You can use the ResetControlRotation function on the BPUGCCameraManager with the duration of the rotation to achieve this effect.
How do I use or a custom Movement Component with UGC ?
If you’re using a movement component that doesn’t inherit from Unreal’s default Movement Component class (like GMC), you can still use UGC. We have removed all dependencies of UGC on the Character class and you’re able your own custom Movement Component which doesn’t inherit from Unreal’s.
For the most part, you will need to follow the same installation tutorial, but you will also need to do some extra steps.
Since some of our camera modifiers need to have read access to some movement properties in order to function correctly, you will need to make your pawn class use our UGC_PawnMovementInterface, which we use behind the scenes when your pawn doesn’t have a normal CharacterMovementComponent.
Once your add the interface, you will notice some functions are added to your blueprint. You will need to implement all of these functions so that our Camera Modifiers get the information they require from the movement of your pawn.
- IsStrafing: Returns a boolean which is true when the owner character is strafing (using controller yaw rotation or controller desired rotation).
- IsMovingOnGround: Returns true when owner character is moving on the ground.
- IsFalling: Returns true when owner character is falling.
- GetVelocity: Returns the velocity vector of the character.
These are basic functions which any movement component should be able to provide.
How do I possess other characters ?
Check out the following tutorial.