Spline controller mk2

From Unify Community Wiki
Revision as of 10:11, 10 August 2013 by Smoke fumus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Summary

This is particial rework of Hermite Spline controller which you can find here: Hermite_Spline_Controller


Main changes are:

  • Visual editor: Ugly method of checking for children inside of spline root was removed, and instead visual Hinges were added to make it similar to iTweenPath editor.
  • Added SplineInterpolatorMK2 with static IEnumerator for fast calls within body of spawning script. Now you can either use old method of assigning spline to object or use something like this:

SplineControllerMK2.png


StartCoroutine(SplineInterpolatorMK2.InMov(GameObject targetSplineControllerObject.GetComponent<SplineController>(), gameObject prefab, Callback void Callback(GameObject obj)));

And it will start coroutine which will move desired object along spline.


Download

File:SplineControllerMK2.zip

Extract to your Assets folder, assign spline controller to empty object, add nodes. Then either add object controlled by spline as child/add mesh filter or turn off AutoStartPath and use Co-routine method described above from within your own script.

Known bugs:

  • You need to manuualy set quaternions W to 1.
  • Scale currently ignored
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox