Hi there....
I've wrote this code
Error " Object reference not set to an instance of an object"
I've wrote this code
Code (JavaScript):
- var MainCamera : Camera;
- @HideInInspector
- var targetXRotation: float;
- @HideInInspector
- var targetYRotation: float;
- @HideInInspector
- var targetXRotationV: float;
- @HideInInspector
- var targetYRotationV: float;
- var rotateSpeed : float = 0.3;
- var holdHight : float = -0.5;
- var holdSide : float = 0.5;
- function Update ()
- {
- transform.position= MainCamera.transform.position + (Quaternion.Euler(0,targetYRotation,0)* Vector3(holdSide,holdHight,0));...