/// <summary> Starts investigative behaviour surrounding parsed object. </summary> /// Overrides exsisting objects of interest. /// Sets areaOfInterrest and destintaion. resets deltas. public void Investigate(GameObject toInvestigate) { if (toInvestigate == null) { CompleteInvestigation(); return; } loactionOfInterest = TransformData.CloneTransform(toInvestigate.transform); Investigate(loactionOfInterest.position); }
public void lookAt(Vector3 position) => iTween.LookTo(gameObject, position, 2f); // Look at position of target. #endregion #region Menu /// <summary>Moves the connected camera to it's menu position</summary> /// Animates smooth motion over time using itwizzy utilities public void MenuPosition() { menu = true; // Declare menu mode active prevTransform = TransformData.CloneTransform(transform); // Store playtime position for returning // Define itwizzy hastable keys Hashtable args = new Hashtable(); args.Add("name", "PlayerCamToMenu"); args.Add("position", MenuTarget.transform.position); args.Add("time", 1f); args.Add("looktarget", new Vector3(1, gameObject.transform.rotation.y, gameObject.transform.rotation.z)); args.Add("looktime", 1f); iTween.MoveTo(gameObject, args); //Execute movement }