//hidden Points public ControlPoint(AnimationAuthoring tool, string text) { GameObject = new GameObject("ControlPoint(hidden)" + (tool.transform.childCount).ToString()); GameObject.transform.SetParent(tool.transform); this.Transform = GameObject.transform; this.Velocity = Vector3.zero; this.MotionTime = 0; }
public Trajectory(int size, string[] styles, Vector3 seedPosition, Vector3 seedDirection, AnimationAuthoring aa = null) { AnimationAuthoring = aa; Inspect = false; Points = new Point[size]; Styles = styles; for (int i = 0; i < Points.Length; i++) { Points[i] = new Point(i, styles.Length); Points[i].SetTransformation(Matrix4x4.TRS(seedPosition, Quaternion.LookRotation(seedDirection, Vector3.up), Vector3.one)); } }
public ControlPoint(AnimationAuthoring tool) { GameObject = new GameObject("ControlPoint" + (tool.transform.childCount).ToString()); GameObject.transform.SetParent(tool.transform); SphereCollider = GameObject.AddComponent <SphereCollider>(); SphereCollider.center = Vector3.zero; SphereCollider.radius = 0.2f; GameObject.AddComponent <DragObject>(); this.Transform = GameObject.transform; this.Velocity = Vector3.zero; this.Styles = new Style[] { CreateStyle("Idle", 0f), CreateStyle("Move", 1f), CreateStyle("Jump", 0f), CreateStyle("Sit", 0f), CreateStyle("Stand", 0f), CreateStyle("Lie", 0f), CreateStyle("Sneak", 0f), CreateStyle("Eat", 0f), CreateStyle("Hydrate", 0f) }; this.MotionTime = 0; }
public ControlPoint(AnimationAuthoring tool, string[] names, float[] values) { if (tool.transform.childCount > 0 && tool != null) { GameObject = new GameObject("ControlPoint" + (tool.transform.childCount).ToString()); } else { GameObject = new GameObject("ControlPoint0"); } GameObject.transform.SetParent(tool.transform); SphereCollider = GameObject.AddComponent <SphereCollider>(); SphereCollider.center = Vector3.zero; SphereCollider.radius = 0.2f; GameObject.AddComponent <DragObject>(); this.Transform = GameObject.transform; this.Velocity = Vector3.zero; SetStyles(names, values); this.MotionTime = 0; }
void Awake() { Target = (AnimationAuthoring)target; }