CS1513: } expected

  • Thread starter Thread starter Tree_Man
  • Start date Start date
T

Tree_Man

Guest
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using UnityEngine;

public class Camera_Control : MonoBehaviour
{
public enum RotationAxis
{
MouseX = 1,
MouseY = 2


}

public RotationAxis axes = RotationAxis.MouseX;



public float sensHorizontal = 10.0f;
public float sensVertical = 10.0f;
public float _rotationX = 0;


void Update()
{
if (axex == RotationAxis.Mousex)
{
transform.Rotate(0, Input.GetAxis("Mouse X") * sensHorizontal, 0);
else if (axes == RotationAxis.MouseY)
{
_rotationX -= Input.GetAxis("Mouse Y") * sensVertical;

float rotationY = transform.localEulerAngles.y;

transform.localEulerAngles = new Vector3(_rotationX, rotationY, 0);





}


}





}
}

Continue reading...
 
Back
Top