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

Error " Object reference not set to an instance of an object"

$
0
0
Hi there....
I've wrote this code
Code (JavaScript):
  1. var MainCamera : Camera;
  2. @HideInInspector
  3. var targetXRotation: float;
  4. @HideInInspector
  5. var targetYRotation: float;
  6. @HideInInspector
  7. var targetXRotationV: float;
  8. @HideInInspector
  9. var targetYRotationV: float;
  10.  
  11. var rotateSpeed : float = 0.3;
  12. var holdHight : float = -0.5;
  13. var holdSide : float = 0.5;
  14.  
  15. function Update ()
  16. {
  17.     transform.position= MainCamera.transform.position + (Quaternion.Euler(0,targetYRotation,0)* Vector3(holdSide,holdHight,0));...
Error " Object reference not set to an instance of an object"

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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