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

I am getting following error in Unity error CS0101: The namespace `global::' already contains a definition for `RotateAround', InvalidOperationException: Operation is not valid due to the current state of the object

$
0
0
The screen shot of my error ![alt text][1] [1]: /storage/temp/79747-screenshot-from-2016-10-08-221541.png my script which I am getting error using UnityEngine; using System.Collections; public class RotateAround : MonoBehaviour { public Transform target; // the object to rotate around public int speed; // the speed of rotation void Start() { if (target == null) { target = this.gameObject.transform; Debug.Log ("RotateAround target not specified. Defaulting to parent GameObject"); } } // Update is called once per frame void Update () { // RotateAround takes three arguments, first is the Vector to rotate around // second is a vector that axis to rotate around // third is the degrees to rotate, in this case the speed per second transform.RotateAround(target.transform.position,target.transform.up,speed * Time.deltaTime); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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