Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Changing cameras with static methods isn't working

$
0
0
Hi all,
I'm trying to switch from third to first person when the player enters a collider and it won't work.
I have my very simple class on the collider object, calling a method.
Code (CSharp):
  1. public class ventCrouchToggle : MonoBehaviour {
  2.  
  3.    void OnTriggerEnter(Collider other)
  4.     {
  5.         CamCallToggle.SetToggleVar();
  6.     }
  7.  
  8.     }
Then this code should change the cameras whenever I call SetToggleVar() but it won't.
Code (CSharp):
  1. public class CamCallToggle : MonoBehaviour
  2. {...
Changing cameras with static methods isn't working

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>