Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving multiple controllers at once
#5
No PC? Are you in hell? Big Grin

No seriously though, sorry, but that didn't help. When I try to do something new I want to do it properly so it looks nice, is useful and that I learn as much as possible.

This is what I want to achieve:

  1. I want the script to run only when I have 2 or more splinecontrollers selected. I've been trying figure out how to get an int from Selection.stuff.., but no luck. I can't figure out how to check how many of the selected objects have the correct component. I don't even know if it is the correct approach, is there a way do a check if you are editing multiple items of the correct type (component)?
  2. Once 1 is fixed I want, if it's even possible, to override how splinecontrollers move multiple objects now. I want, when you move the position slider during multi selection, to offset each controller by input value from the slider, instead of moving all to the same spot.
  3. If 2 is not possible, I want a new slider to appear under the position slider that does point 2. Or if you can't modify other scripts at all I want the slider to appear next to the Curvy icons in the scene view.
  4. When all this is done I need a check so all controllers stop moving when one hits the end of spline so the offsets doesn't get messed up, but this will probably be easy.
Right now I don't even know if I have setup the script correctly, so right now I'll appreciate all help.

Code:
using UnityEngine;
using UnityEditor;
using FluffyUnderware.Curvy.Controllers;

namespace FluffyUnderware.CurvyEditor.Controllers
{
   public class MoveMultipleControllers : EditorWindow
        {
       public void OnSelectionChange()
       {
           


       }
   }
}
Reply


Messages In This Thread
Moving multiple controllers at once - by Lupp_ - 01-15-2020, 07:46 PM
RE: Moving multiple controllers at once - by Lupp_ - 01-17-2020, 05:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Distance travelled across multiple splines jh092 1 7 02-23-2024, 09:44 AM
Last Post: _Aka_
  Best practice for controllers slowing down/speeding up along the spline Curry 1 5 08-06-2023, 09:47 PM
Last Post: _Aka_
  Moving object down or up the spline using gravity velikizlivuk 6 19 07-26-2023, 10:06 PM
Last Post: _Aka_
  Multiple Splines and Generators Performantly for Road System drock 1 6 07-17-2023, 10:31 AM
Last Post: _Aka_

Forum Jump: