Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

I have a error and I've tried everything can't find anything wrong

$
0
0
The error's: Assets/Scripts/camera_motor.cs(32,36): error CS1026: ) expected Assets/Scripts/camera_motor.cs(32,57): error CS1002: ; expected Assets/Scripts/camera_motor.cs(32,57): error CS1513: } expected And this is my code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class camera_motor : MonoBehaviour { public Transform lookAt; public float boundX = 0.15f; public float boundY = 0.05f; private void LateUpdate() { Vector3 delta = Vector3.zero; float deltaX = lookAt.position.x - transform.position.x; if (deltaX > boundX || deltaX < -boundX) { if (transform.position.x < lookAt.position.x) { delta.x = deltaX - boundX; } } else { delta.x = deltaX + boundX; } float deltaY = lookAt.position.y - transform.position.y; if (deltaY > boundY || deltaY < -boundY) { if (transform.position y < lookAt.position.y) { delta.y = deltaY - boundy; } } else { delta.y = deltaY + boundY; } transform.position += new Vector3(delta.x, deltaY, 0); } } Hope someone can help

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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