Search Unity

Simple Waypoint System (SWS) - Move objects along paths

Discussion in 'Assets and Asset Store' started by Baroni, Dec 10, 2011.

  1. FlarePoint

    FlarePoint

    Joined:
    Jun 18, 2014
    Posts:
    6
    That didn't seem to work, Ill explain in detail.
    I have set up my Frog to follow a path, and I have added a spline movement script to him. I am using in conjunction with Playmaker and unchecked the spline script. I added SWS_Set Path to it. He moves fine around the map but when my player walks in front of him while he is walking towards me, he seems to repel himself back a few meters and then continue the path from there. Its as if he detects my players mesh collider as a wall so he jumps backwards to somehow correct itself. I have also tried the Mininmal Movement script and with that he repels himself right back to the start of the path.

    Thank you for your help!

    EDIT: Problem solved! The starting state on Playmaker was the start of the SWS_Set Path, and it also had a trigger to change states if I enter near it, then If I left the trigger it went back to the start state and reset the SWS_Set Path part which caused it to teleport back a few steps refreshing itself. So I created a new state which I set to start state, and then linked it to the trigger/movement state .1 of a second later, then not having to worry about it setting path again.
     
    Last edited: Aug 13, 2014
  2. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    38
    Hi, I'm making some enemy movement behavior using SWS splineMove, but looks like the "local" option in splineMove doesn't work at all. I mean I want to make enemy type of Frog, but when putting instances of Frogs on the scene, they all move to the exact location on the scene space, not local space as I want.
    Is there anyway to make the "local" option works as I expect?
     
  3. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hi, please check the 'local' sample in example scene 4 (there's a rotating path). The local option is meant for moving an object relative to its path, so you have to parent your walkers to their path and reposition the path instead.
     
  4. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    38
    Thanks for replying.
    So the "local" option is not really what I'm looking for.
    I guess my only option is to create an empty parent GameObject and make the path and the enemy children of it. Then create instances of the parent where I want on the scene.
    Is it costly in term of performance to create many paths on the scene? (I mean it can be hundreds of them)
     
  5. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    No, Unity can handle thousands of empty gameobjects with nearly no impact on performance. But it's always better to re-use old instances of paths (think of object pooling), of course.
     
  6. cihideunk

    cihideunk

    Joined:
    Aug 29, 2014
    Posts:
    3
    Hi..
    I am trying to intefrate SWS+playmaker in my project. I just use 'Start movement's action'. But, the agent cannot flow the path in good direction. What is the problem?


    SWS1.jpg SWS2.jpg
     
  7. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hi,
    please try setting the 'Lock Axis' variable on the movement script back to none. If this doesn't help, it could be that your model has a different rotation than expected by the tweening system. In this case you can create an empty gameobject as the parent of your model, attach the movement script to this gameobject and rotate the child (model) as desired.
     
  8. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    Hello,

    This asset looks great! I'm very new to Unity and am curious to if I can create a motion path with a first-person view, similar to this technique:


    For me, it seems easiest to move the camera in first person, while pressing CTRL+SHIFT+W to bring a component to each keyframe that is also logged in the animation panel. If I could create my flight path this way and then exit to 3rd person view to edit the waypoints, I feel it would be the best way to accurately record exactly where I want my component to travel... but I could be wrong. If this is not a recommended means of pathbuilding, or there is a better way of creating a smooth but complex path in this asset, I'd love to know.

    (Specifically, I'm wanting to create an exciting flight path for a dragon that will be followed with a 3rd person camera. The camera will serve as a first-person view for the viewer, who is able to ride on a sled attached behind the dragon - like a sleigh - for an "on rails" Oculus Rift experience.)

    EDIT: Two more questions.

    1.) Can I easily rotate the component along its path, perpendicular to the horizontal plane (z-axis)? Like making an airplane bank as it turns?

    2.) And is it possible to temporarily adjust the speed within the path? Again, like how an airplane would slow as it climbs, and accelerate as it dives.

    My apologies if I've overlooked these feature in the documentation or demos, I'm still a bit overwhelmed with learning Unity altogether.

    Thanks!
     
    Last edited: Aug 30, 2014
  9. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hi saucer,

    thanks for your questions and for showing me the video. With Simple Waypoint System you can build paths exactly as shown in your video, but in this asset you are actually placing real gameobjects (waypoints) in the scene, not keyframes. You are doing this by using the built-in Unity handles for moving objects around - not via the animation panel or some other animation window. We have a really old video for this asset and the path creation part here.

    Regarding your other questions:
    1. You can either let the movement component control the object's rotation to always face the path, or disable this behavior altogether and control the rotation by yourself.
    2. Movement speed can be adjusted at runtime by calling its ChangeSpeed() method with the new speed value.
     
  10. cihideunk

    cihideunk

    Joined:
    Aug 29, 2014
    Posts:
    3
    Hi... Thank you for your support. I was success to move human model with good direction. I tried to move 'static' game object, i.e. 3d car model. But I failed to move with good direction. How I adjust the SWS setting?


    This is the setting of SWS
    setting.jpg
     
  11. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Enable 'Orient To Path' and add some height to 'Size To Add' so it does not go into the ground. Also the origin (pivot point) of your car model looks off, you would have to center it in your modelling application.
     
  12. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    Thanks for your help Baroni - sorry it's taken me so long to try out your asset.

    I just purchased SWS and have watched the video you posted for me, but I didn't see anything about creating a path within a first-person view. Am I overlooking a way to create the points at each angle and position the camera is facing?

    I feel like you mention this technique on page 5 of your documentation, but it's a little over my head. (Is it the Path Rendered script?) If you DO have a video explain how to create a path according to the camera view at each waypoint, I'd love to watch it...

    Thanks again for any help!
     
  13. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    @saucer78
    Aaaah, sorry I misunderstood what you are trying to accomplish. Currently there isn't a script in SWS that does this, but I think you could write a short editor script that creates gameobjects at the scene view position by pressing a key? With the gameobject (waypoint) created, you only have to assign it to a slot in the PathManager's 'waypoints' array after that.
     
  14. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    That would be awesome! I'm looking into Camera Path Editor right now as well, and it doesn't seem to have this feature either :(

    It seems to me a first-person option would save tons of time creating the initial path - especially for devs like me who are concerned with a flight path, rather than a mostly 2D path for a character to move about the ground. Users could simply "fly around" in the Scene view (maybe not even an actual camera object) using WSAD and press a key to place a waypoint at each desired location, facing the direction of the Scene. Much like how one can press 'p' right now, but it would take a "snapshot" of the current view rather than placing a waypoint where the mouse cursor is. It would basically allow users to tip-toe through their scene, placing waypoints every few steps, rather than building pathway from afar.

    I hope I am conveying this clearly... I don't know if I have the vocabulary to accurately describe, but again, the video I linked to earlier is accomplishing this, albeit in a much more complicated way.(
    )

    I would use that method to create my flight path but it lacks the ability to edit the spline/curve with the transform gizmos - which is what is so great about your asset :)

    If you did add this option, do have any idea how long it would take? I'm a bit pressed for time, but can wait a bit if it keeps from having to construct a huge flight path in 2D and then dragging all of the waypoints up and down.

    Thanks so much for your awesome support!
     
  15. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    @saucer78
    Although I wrote "I think you could [...]" (you misread that on purpose, didn't you :D ), you convinced me to add that functionality to the main package in one of the next updates ;). I'll come up with something tomorrow. Please send me an email with your invoice no. of your purchase, so I can send it to you when it's done. Thank you for your explanation and kind words!
     
    MD_Reptile and saucer78 like this.
  16. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    Haha! I would love to begin creating and tweaking assets, but I've only been playing with Unity a dozen or so hours and have yet to learn the least bit of coding. I wouldn't know what to do without The asset store and support communities :D
     
  17. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi
    Purchased today - thanks very easy to use so far.
    My issue is that my 2D game is top down and i need my sprite (2dToolkit) to move from bottom of screen to top (portrait mode). It's Waypoint path has the sprite moving up, doing a loop, before going off screen at top. The issue is that the orient to path doesn't work for this direction. It seems to want to point using the right side of my sprite, rather than the top of the sprite. I've tried childing it to a game object that I rotated, etc, but nothing works. It ALWAYS takes the right side of the object or sprite as the "front" of the sprite, even when it's rotated.

    Please help! If this doesn't work the purchase was for nothing. Cheers


    UPDATE:
    The only way I can find this to work is a hack. I re-exported my original art from illustrator, rotating the character 90degrees. Then in unity, rotating the sprite object 90 in Z.

    Is there a way you could include an "axis" option, so that we can select which axis to orient to? I don't want to have to go and rotate all of my art - that's awful! Not all side scrollers and top downs go from left > right! ;)
     
    Last edited: Sep 24, 2014
  18. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hey OceanBlue,

    thanks for your purchase. Instead of rotating images directly, you could also make use of a parent object (with the movement script) in Unity and rotate its child (sprite) to the correct orientation. That's not a hack by any means, and is actually being widely used for not only 2D sprites but also 3D characters. Regarding an "to-Axis"-option: it's not something I could add (but expose), as SWS uses the tweening library HOTween for movement, so I suggest posting an unobtrusive feature request in HOTween's thread (and maybe donating a buck or two ;) ).
     
    OceanBlue likes this.
  19. B0b

    B0b

    Joined:
    Sep 26, 2014
    Posts:
    5
    Hi i bought the script lately but seems that there is a bug when swtching from one path to another .
    In the example your are showing you are using 2 points in each path, If you add more points to the path and you activate the set path method the player will not go to the starting point of the path .
    For example :
    path 1: A - B -C -D
    path 2 : A2- B2-C2 -D2
    If the player reaches B in the first path and you activate the set path method the player will disappear and then appears in B2 instead of walking to A2 .
     
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hey Bob,

    please don't abuse reviews for support questions. I receive email notifications for each of them, and there is no need to put more pressure on this.

    Some customers wanted to switch to a path at a further waypoint, instead of starting from the beginning. It seems that one of the latest updates changed the opposite behavior. Replace the ResetMove() method with this piece of code:

    Code (csharp):
    1. public void ResetMove(bool reposition)
    2. {
    3.        Stop();
    4.        currentPoint = startingPoint = 0;
    5.        if (pathContainer && reposition)
    6.            transform.position = pathContainer.waypoints[currentPoint].position
    7.                                            + new Vector3(0, sizeToAdd, 0);
    8. }
    Now, if you want your object to walk from the current position to the beginning on the new path, first call ResetMove(false). Then set moveToPath back to true, before calling SetPath(...).
     
  21. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Updated to Unity 4.5.4 p2 and getting this error while removing message for waypoint zero in inspector.

    Retrieving array element that was out of bounds
    UnityEditor.SerializedProperty:GetArrayElementAtIndex(Int32)
    SWS.moveEditor:SetMessageOption(Int32, String, Int32, String) (at Assets/SWS/Scripts/Editor/moveEditor.cs:196)
    SWS.moveEditor:MessageSettings() (at Assets/SWS/Scripts/Editor/moveEditor.cs:439)
    SWS.splineMoveEditor:OnInspectorGUI() (at Assets/SWS/Scripts/Editor/splineMoveEditor.cs:87)
    UnityEditor.DockArea:OnGUI()

    NullReferenceException: Object reference not set to an instance of an object
    SWS.moveEditor.SetMessageOption (Int32 index, System.String field, Int32 slot, System.String value) (at Assets/SWS/Scripts/Editor/moveEditor.cs:196)
    SWS.moveEditor.MessageSettings () (at Assets/SWS/Scripts/Editor/moveEditor.cs:439)
    SWS.splineMoveEditor.OnInspectorGUI () (at Assets/SWS/Scripts/Editor/splineMoveEditor.cs:87)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty)
    UnityEditor.DockArea:OnGUI()
     
  22. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    I can't see any related changes in the release notes or reproduce it on my end, but does this fix it for you?
    Code (csharp):
    1. //line 384 in moveEditor.cs
    2. if (mList[i].message.Count > 1 && GUILayout.Button("-"))
    3. {
    4.       RemoveMessageOption(i);
    5.       return;
    6. }
     
  23. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Great, that fixed the problem.
    I don't think the problem is due to my unity upgrade. I did not notice this problem before because I did not use feature much until recently.
     
  24. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi
    I'm totally confused on how to achieve the following.
    I have a 2d game object with a minimal move script on it that directs it on start along the path. That works fine. Now at the end of the game I want this same 2d object to exit the scene on a different path. I put a second minimalMove script on the object with this new path, but i have a feeling this is wrong? How do i tell the object to now use the second path? I've read through the forums for examples, but still so confused on how to use pathContainer or SetPath....

    Thanks
     
  25. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hey @OceanBlue,
    you don't need a second movement script on the object. Just call SetPath() with the PathManager or path name on the existing movement component. If you would like to start from the beginning of the path, add ResetMove() before calling SetPath() (will be the default in the next update).

    Code (csharp):
    1. minimalMove move = myObject.GetComponent<minimalMove>();
    2. move.ResetMove();
    3. move.SetPath(WaypointManager.Paths["my new path name"]);
     
  26. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Is there a way to generate a random path given a start,middle,end waypoint by code?
     
  27. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    You would have to write your own method to do that. Create a gameobject for the PathManager component, create multiple gameobjects as waypoints by using your "random" function and assign them to PathManager's waypoint array.
     
  28. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Thanks. Btw, how to integrate SWS with LeanTween.
     
  29. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    You mean having both SWS and LeanTween in the same project (are there any conflicts if you do so?) or using LeanTween for the movement part in SWS? The latter requires a complete rewrite of all movement scripts except navMove (or adding a new movement script, if you don't want to replace them).
     
  30. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    I mean for SWS to support LeanTween. Reason is that LeanTween is very performant and even works on Flash.
     
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Then a separate movement script using LeanTween would be a better idea. There's no restriction on using the existing PathManager components in combination with LeanTween. I can't see me supporting that though, because of the upcoming integration of @Izitmee 's DOTween (which outperforms LeanTween).
     
  32. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    DOTween is great but it's in alpha and will take at least 3 months before being solid enough for use. The performance of DOTween is comparable with LeanTween, although LeanTween startup time is still much better. (consistently 50% of DOTween)
     
  33. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Where do you get that information from? If I implement DOTween in SWS, it has undergone many internal tests and provides all functionality necessary for hundreds of SWS users. Otherwise I wouldn't release it. Regarding startup time: if a game's performance depends on milliseconds, I would look elsewhere for optimizations (and that 50% boost is true for thousands of tweens).
     
  34. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    I'm not talking about SWS taking 3 months. DOTween is in Alpha. This means that DOTween will have to get to Beta and then Release. Based on my own experience I'm thinking this take 3 months. What this means for SWS is that in order to upgrade to DOTween, you will have to wait for a stable DOTween version. If you are integrating DOTween at Alpha and Beta, the API could change.

    As for startup time in milliseconds.. yes you are correct, this is little, but when combined with all of the other start up time for the AI, Navmesh, physics, particles in a complex project, it all adds up. On top of all of this, while delivering on an older mobile platform. I know I'm being a bit too careful about performance but my project is very much constraint by performance.
     
    Last edited: Sep 30, 2014
  35. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Is there a way to change the handles on the bezier nodes in the editor? Reason is that I have two nodes very close to one another and would like to modify the curve between the nodes. Also while using a bezier path, I would like to vary the control handles on various nodes.

    Also is it possible to use another path system. For example, I have Curvy Spline and would like to use it as the path. Is this possible.
     
    Last edited: Oct 1, 2014
  36. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Handles for BezierPathManagers are being drawn in BezierPathEditor.cs, starting at line 353. You can modify the size or shape there. For varying control handles I suggest creating short scripts with OnDrawGizmos() and attaching them to the specific waypoint directly, rather than modifying code.

    I don't know how Curvy handles its paths, so I can't be of much help here unfortunately. If it allows access to a Vector3 waypoint/path array (similar to the one implemented per movement script), I would start by replacing PathManager with the Curvy equivalent path component and setting the waypoint array.
     
  37. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Thanks for both suggestions. Will try it out.
     
  38. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    A feature request, when zooming into the waypoints can you make it so that the control points and handles stay at a manageable size. At the moment, when zooming in, the control points get so big that they take cover everything in the scene. As an example, looking at Unity's gizmo, when zooming in and out, it stays the same size.

    The first part of the video shows how SWS control points get scaled too big and the second part shows Unity's gizmo when zooming in and out.

    https://dl.dropboxusercontent.com/u/48378123/GizmoZooming.mp4

    Here's what it looks like when zooming into a bezier CP - Very difficult to even select the right CP or handle.
     

    Attached Files:

    Last edited: Oct 1, 2014
  39. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Yes, noted. Thanks!
     
  40. PlayKiseki

    PlayKiseki

    Joined:
    Oct 4, 2014
    Posts:
    14
    Hi Baroni,

    Thanks for your continued community support.

    I'm getting to grips with SWS and it seems perfect for my needs. I'm making a side-scroller shmup where enemies come in from the right hand side at differing heights. Is there any way, using SWS, to make the path relative to the gameObject using it?

    For example:
    Enemy A spawns at y-10 and follows path A (starting at y-10)
    Enemy B spawns at y-5 and follows path A (starting at y-5)
    Enemy C spawns at y-0 and follows path A (starting at y-0)

    So, I want one path that enemies follow in separate instances and positions on-screen. Is it possible to do so?
     
  41. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hi PlayKiseki,

    sure! You could make your enemy a child of a guiding (empty) gameobject. This gameobject would have the movement script attached and therefore follows your path precisely. You can then modify the y-position of the child (enemy) where you want them to be, and they will follow the path starting at that relative position. Hope this helps.
     
  42. PlayKiseki

    PlayKiseki

    Joined:
    Oct 4, 2014
    Posts:
    14
    Ah, that simple! Why didn't I think of that?!

    Thanks so much, I can finally move on with my project :)
     
  43. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    v4.0.4
    - added option to place waypoints at the scene view position,
    see WaypointManager help text before starting a new path
    - fixed SetPath not resetting the current waypoint index by default
    - added SetPath overload to keep the current waypoint index
    - added parameter to ResetMove() for repositioning the walker object
    - fixed potential moveEditor OutOfBounds error when removing messages
    - Gizmo and Handle sizes are now based on screen size
    - PlayMaker actions: modified StopMovement, added ResetMovement
     
  44. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi Baroni, this is a great system you have here, I have tested the web player and I have one main query about this asset. Is it possible to have a character use a path based on only certain conditions?

    For example, consider a simple path from point A to point B already set up in the scene. A player character can be walked around the scene as one would expect (ignoring the path), however if the player collider touches the path they begin to move along the path towards either point A or B (depending on which way they were facing) . Basically it would work similar to a two way zipline, when the player is close enough to the path they would zip along it to the end of the path, where they would detach. Could something like this be achieved with this asset?
     
  45. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    Hey Hamesh, thanks for your interest.

    "Jumping" on a path between waypoints would require some minor enhancements when working with SWS. The easiest solution I can think of for a "zipline behavior" would be to insert a new waypoint at the position the player should lift off, and then starting movement at that waypoint (by specifying the index). So yes, it can be achieved.
     
  46. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Is there any way to easily implement a timeline scrubber for SWS, which simply rewinds / fast fowards between waypoints? If I could simply add a GUI which lets me rewind gameobject's waypoints, then just let it go from there, it would be perfect. (All my stuff is done with SWS messages to send commands, so once they hit the next waypoint it will begin playing the scene correctly, if I were able to rewind. I can kindof fastforward individual ones by adjusting their movespeed, but can't rewind.)

    SWS is perfect for all my cutscenes, and the command system is great for me to create these sequences. However, any changes I do, I have to hit "Play" and watch the entire cutscene to see the changes.

    I'd kill to be able to use SWS for everything, but allow in-game or in-editor scrubber so I can update/reitarate the same timeline segment (so I don't have to preview the entire cutscene even if I only change seconds 4s to 5s).
    Or being able to preview SWS paths in the editor, would be valuable.
     
  47. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    HOTween has a method for setting the current time position between waypoints: Tweener.GoTo(). You could add a UI slider to the scene which calls that method on the tween with a given time value. Note that calling GoTo on splineMove's tween will modify the position between waypoints, while calling it on minimalMove will modify the position on the full path.
    Tweens are being initialized at runtime, so that won't be possible.

    Edit: You can also pass a negative value to ChangeSpeed() for your object to move backwards.
     
  48. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    This probably won't be seen by the right people, but if you gave Simple Waypoint System a rating below 5 stars on the Asset Store, please tell me why.
     
  49. PlayKiseki

    PlayKiseki

    Joined:
    Oct 4, 2014
    Posts:
    14
    Hi Baroni, It's this guy again.

    SWS is being awesome for my project, but I'm having a problem. I have a gameObject which is following the path, and I want it to accelerate and decelerate to/from each waypoint. I can get it to do this using the splinemove script & easeInOut settings, but the object pauses at each waypoint. I don't have any delays set or anything. Could you point me in the right direction for having the object move smoothly through the path?

    The answer is probably really simple and I'm really dumb @@;

    Thanks!
     
  50. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    @PlayKiseki
    Hi there, well it's one or the other: time based (ease types) or speed based (smooth) movement :)
    Ease types are designed to animate objects on an animation curve (see here for an overview), before they start from the beginning. There is always a slight delay on InOut eases, otherwise they would be linear. If you want to define your own ease type, set the ease type to "AnimationCurve" and adjust the animation curve as desired. If you make it more linear, it will have less delay.