I have seen many other post about this but i just cannot seem to get it to work.
I’m trying to use unity’s HandHeldCam script as my main camera.
I have made the variables that i want to change in the HandHeldCam script to public, what i want to do is make it so that when the player has under a certain health the camera starts to sway slightly more.
I am able to do all the rest myself but i just cam seem to get the m_SwaySpeed over to my other script
namespace UnityStandardAssets.Cameras
{
public class HandHeldCam : LookatTarget
{
public float m_SwaySpeed = .5f;
public float m_BaseSwayAmount = .5f;
I need to access these variables from this script
public Camera Cam;
public float playerHealth;
void Start () {
playerHealth = 100;
Cam = GetComponent<Camera>();
}
Using things like public HandHeldCam Sway;
don’t seem to work
If anyone can help that would be amazing.