You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
549 B
C#

6 months ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Autohand;
namespace Autohand.Demo{
public class WheelRotator : PhysicsGadgetHingeAngleReader{
public Transform move;
public Vector3 angle;
public bool useLocal = false;
void Update(){
if(useLocal)
move.localRotation *= Quaternion.Euler(angle*Time.deltaTime*GetValue());
else
move.rotation *= Quaternion.Euler(angle*Time.deltaTime*GetValue());
}
}
}