Skip to content

Instantly share code, notes, and snippets.

@tsubaki tsubaki/Rotation.cs
Created Sep 21, 2017

What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Timeline;
public class Rotation : MonoBehaviour, ITimeControl {
[SerializeField] Vector3 axis = Vector3.up;
[SerializeField] float speed = 1;
// 何度も呼ばれる
public void SetTime (double time)
transform.localRotation = Quaternion.AngleAxis (((float) time) * speed, axis);
// クリップ開始時に呼ばれる
public void OnControlTimeStart ()
// クリップから抜ける時に呼ばれる
public void OnControlTimeStop ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.