Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - cpufreak91

Pages: [1]
I'd like to simulate planets orbiting a sun, but catmull rom paths make it rather hard to create a decent-looking circle and I don't want to manually input 100+ points to create a circle. Is there a way to set up the waypoints for the visual editor in code (as an editor script?) to be a "perfect" circle, and then use the visual editor to tweak it a little if necessary (to deform the circle)? Or can I only create a "perfect" circle using the API (and not visible in the editor)?

Here's how I got it to work. There doesn't seem to be any documentation on the website, so I figured it out thanks to intellisense and created an editor/inspector script that adds and modifies the DOTweenPath component:

Code: [Select]
public override void OnInspectorGUI() {
MyCustomScript t = (MyCustomScript)target;
var path = t.gameObject.GetComponent<DG.Tweening.DOTweenPath>();

if (path == null) {
path = t.gameObject.AddComponent<DG.Tweening.DOTweenPath>();


Pages: [1]