Skip to content
Snippets Groups Projects
Select Git revision
  • 3ad4d427c23a8bc2e7db001502edd1e6854f38d3
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

AlignText.cs

Blame
  • AlignText.cs 550 B
    using UnityEngine;
    
    public class AlignText : MonoBehaviour
    {
        // Start is called before the first frame update
    
        public Camera Cam;
    
        void Start()
        {
            Cam = Camera.main;
        }
    
        // Update is called once per frame
        void Update()
        {
            transform.forward = Cam.transform.forward;
            //Not yet the perfect solution
            //Problem is the relative rotation of the TextMesh to the Line-Parent
            //transform.rotation = Quaternion.Lerp(transform.parent.transform.rotation, Cam.transform.rotation, 0);
        }
    }