Created
April 8, 2020 21:18
-
-
Save kuroiwasi/833be3a13bb65adcdfbd317649196115 to your computer and use it in GitHub Desktop.
VEChat UDON(U#) Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UdonSharp; | |
using UnityEngine; | |
public class Hallclock : UdonSharpBehaviour | |
{ | |
public Transform mHand; | |
public Transform hHand; | |
void Update() | |
{ | |
var now = DateTime.Now; | |
mHand.rotation = Quaternion.AngleAxis(now.Minute * 6.0f + now.Second / 12.0f, Vector3.forward); | |
hHand.rotation = Quaternion.AngleAxis(now.Hour * 30.0f + now.Minute / 2.0f, Vector3.forward); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment