Skip to content

Instantly share code, notes, and snippets.

@kuroiwasi
Created April 8, 2020 21:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuroiwasi/833be3a13bb65adcdfbd317649196115 to your computer and use it in GitHub Desktop.
Save kuroiwasi/833be3a13bb65adcdfbd317649196115 to your computer and use it in GitHub Desktop.
VEChat UDON(U#) Script
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