<commit_before>﻿using UnityEngine;

public class Billboard : MonoBehaviour {

    //LateUpdate prevents any flickering that might happen if the camera moves after the Billboards update.
    //Camera movement should happen during the update function.
    void LateUpdate() {
        Vector3 cameraDirection = Camera.main.transform.forward;
        cameraDirection.y = 0.0f; //remove the y rotation
        transform.rotation = Quaternion.LookRotation(cameraDirection);
    }
}
<commit_msg>Changed the Billboard script to include the y rotation so that it works for 3D games. I'm not sure if this will break previous usages because it was hard to tell what the point was for removing the y rotation.<commit_after>﻿using UnityEngine;

public class Billboard : MonoBehaviour {

    //LateUpdate prevents any flickering that might happen if the camera moves after the Billboards update.
    //Camera movement should happen during the update function.
    void LateUpdate() {
        transform.rotation = Quaternion.LookRotation(Camera.main.transform.forward);
    }
}

{'fraction_non_alphanumeric': 0.06114769520225776, 'fraction_numerical': 0.0037629350893697085, 'mean_word_length': 3.7288888888888887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '559527', 'n_tokens_mistral': 263, 'n_tokens_neox': 252, 'n_words': 114}