Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

question about camera functions

so i used the script taught by brackeys for camera to follow player:

using UnityEngine;

public class camerafollow : MonoBehaviour


public Transform player;

public Vector3 offset;

private void FixedUpdate()


transform.position = player.position + offset;




and then added asset: EZCameraShake.v.1.0.5 for some effect, but i found that it cancels my camerafollow script. im curtain that camera shaker is the problem since i closed its function and start play mode, the camera follow immediately works again. does anyone have suggestions or solutions?

Best Answer

  • MouledouxMouledoux Member
    Accepted Answer

    It's probably because both are trying to affect the cameras transform. You could try putting the camera on an empty object, and have that object follow the player, so the camera will only have to worry about the camera shake. This way, the scripts aren't competing with each other.

Sign In or Register to comment.