Framework 1: Level Refinement

Fixing the Camera so it follows Player During action Sequence and also Lighting Issue.

Time for some quick fixes that has been bugging the game. Currently when we have our character roll, climb up the ledge or scale the ladder, the camera stays in position until the player has finish the animation clip and the camera teleports back to the character location. We are also going to quickly fix the lighting issue when the Players first enter the Tutorial stage from the Main Menu.

Camera Follow:

Currently, as you can see from the example below, the camera does not follow the character when it does the roll animation, this is because or Virtual Camera is set to follow the Character Controller. During the Animation such as rolling, climbing the ladder or ledge the Character Controller is disabled and doesn’t update position. Therefore we get that weird camera delay which isn’t very streamline.

The very awkward camera teleport

In order to fix this, we first must dig deep into our character object and reveal the actual bones (literally) that make up the movement. If we open up the overall player object we will be greeted by the several sections which make up the physical 3D aspect of the player model and also the “Mixamo Original” folder that houses the skeleton. It is here that all the movement is being kept.

Now if I drag this entire skeleton as the Target Follow object for the Virtual Camera you will noticed that the Camera becomes all shaky. That is because the camera now is following the actual skeletal movement. To solve this, I made an empty game object and named it as “Target” and substitute that for the Following Target. I placed the Target game object within the Mixamo Folder so it still keeps track of the animation movements.

The end result is that now whenever the animation happens, the camera will still follow the player like it would normally.

Lighting Issue:

One of the issues that I have encountered from loading one scene to another is that the scene became all dark and unlit. This is because we never added or created a Lighting profile that Unity can render with.

First to access the Lighting window select “Window > Rendering > Lighting. This will bring up the Lighting window which will have all controls from Light Rendering to Skyboxes.

If you haven’t created a lighting profile, the Lighting Settings will be blanked, click New Lighting Settings button to create a new one. There will be a new profile created within the Projects window which you can name.

After you have selected that setting scroll all the way down until you see the “Auto Generate” check box. By default it should be un check, therefore you need to check it. Unity will Bake all the light information (which might take a whlie) that way, when the scene loads all lighting data will be loaded as well.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Simon Truong

Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.