Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bugs & updates needed: Curvy Move Along Spline Distance (Playmaker) not working
#1
Hi, it appears to me that Curvy Move Along Spline Distance (Playmaker) is just not working?

No matter what I try, all that happens is that the object is placed at '0' - no values changes anything, not even setting another Initial Position..

Unity 4.3.3f1
Playmaker 1.7.3.f1
Curvy PlayMaker custom actions v0.23

This page needs update:
http://www.fluffyunderware.com/pages/uni...addons.php

The Playmaker instructions ( http://docs.fluffyunderware.com/curvy/pmcurvy.html ) are full of bugs / needs update as well

[img]images/smilies/confused.gif[/img]


 
Reply
#2
(01-18-2014, 07:16 PM)'FritsLyn' Wrote: Hi, it appears to me that Curvy Move Along Spline Distance (Playmaker) is just not working?
 

 

Hmm.. Made it sort of work by enabeling updates and setting a high Granularity on the spline, but the result is very 'jumpy' - not a steady motion..

I'm trying to mve at a constant speed (as written in other post - sorry this is turning into a double posting, the other post is a question on if it is at all possible to move at a constant speed with Playmaker, and this is a bug repport on what happens when I'm trying to use the methods and instructions I thought should do it / explain how to do it Smile )
 
Reply
#3
(01-18-2014, 08:20 PM)'FritsLyn' Wrote: Hmm.. Made it sort of work by enabeling updates and setting a high Granularity on the spline, but the result is very 'jumpy' - not a steady motion..
You mean enabling "Updates" on the spline? You should keep the Refresh-Settings enabled (it's on by default). And as long as you don't enable "Approximate Position" in the custom action, the granularity shouldn't have an effect. I just tried using the pmSplineWalkerFixed example scene and changed the splines to Bezier and the cubes are moving smooth.


 
Reply
#4
(01-19-2014, 07:08 PM)'Jake' Wrote:
(01-18-2014, 08:20 PM)'FritsLyn' Wrote: Hmm.. Made it sort of work by enabeling updates and setting a high Granularity on the spline, but the result is very 'jumpy' - not a steady motion..

 
You mean enabling "Updates" on the spline? You should keep the Refresh-Settings enabled (it's on by default). And as long as you don't enable "Approximate Position" in the custom action, the granularity shouldn't have an effect. I just tried using the pmSplineWalkerFixed example scene and changed the splines to Bezier and the cubes are moving smooth.


 

 

Hmm.. That example is not using 'Curvy Move Along Spline Distance' - it's using 'Curvy Move Along Spline'.

I'm confused on a higher level Wink Sorry!
 
Reply
#5
(01-19-2014, 08:57 PM)'FritsLyn' Wrote: I'm confused on a higher level Wink Sorry!

 
You're working with a highlevel coding language, so this is absolutely normal [img]images/smilies/biggrin.gif[/img]

Ok, let me explain:

In the CurvyMoveAlongSpline action, just enable "Move by world units" to move at constant speed. That's all you need to do! So what the heck is CurvyMoveAlongSplineDistance good for, you ask? For one simple reason: If you move an object along a spline WHILE you're changing the spline's length (e.g. by adding or removing segments dynamically). For an example, see the pmDynamicSpline example.

Why?

CurvyMoveAlongSpline keeps a TF value and alters it by the speed the user want's (calling Move() or MoveBy() internally). If you add a spline segment, the same TF would refer to a totally different position on the spline, so your object would "warp around".

To overcome this, CurvyMoveAlongSplineDistance stores a Distance. On move, the distance will be converted into a TF, moved and converted back to distance (because splines internally just don't work with distances). If you now add a segment (before the object), the object stays where it should, because the distance of the object from the spline's start did not change.

The latter method is slower (two extra conversions) and as it needs to work on a spline's length you have to refresh the spline's length if you change it (otherwise it's 0 and you get the result you mentioned). Also length calculation relies on Granularity (Spline Length=length of approximation path, the gray path you'll see in the scene view when enabling Approximation gizmo), so it needs to be somewhat high to match the curve closely. On the other side, if you have linear interpolation, you can set the Granularity to 1...

Hopefully that cured your confusion a bit...

Jake
Reply
#6
Great, thank you very much Smile

Then, just so you are aware: Move by world units is not allways 100% steady, specially closer to spline segments very far apart.

Under various conditions, having a straight line (same Y & Z for instance) of segments, it looks like it moves steadily, but over long distances and if your setup depends on it, you'll notice that moving close to (distant) splines slows down a bit. My character was constantly hesitating at certain points.

But now that I know this is just the case and I've set things up right, I'll just tweak the segments so it doesnt matter - instead of trying to force the system to be 100% liniar.

Thanks!
Reply
#7
(01-20-2014, 09:26 AM)'FritsLyn' Wrote: Then, just so you are aware: Move by world units is not allways 100% steady, specially closer to spline segments very far apart.
That's by design. CurvySpline.MoveBy (or setting "Use World Units" in custom actions) works by moving a small step, comparing distances and extrapolating that to move the desired length. It's fast and works without the need to actually precalculate length values, but the downside is that it can get inaccurate.

To overcome this, MoveByLengthFast() can be used, which actually works with cached length values (of course you'll need to set granularity to 20 or even higher, depending on your curve). There's not an option for this yet in the custom actions, but you can just change the custom action and replace MoveBy() with MoveByLengthFast().
Reply
#8
Thank you Smile
 
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Reuse Curvy Generator Wanderfalke 4 48 12-06-2019, 12:06 PM
Last Post: Wanderfalke
  Spawn object on Curvy Spline. ktpttd 3 103 11-20-2019, 01:38 PM
Last Post: _Aka_
  Dummy spline points hnngaf 1 65 11-17-2019, 06:01 PM
Last Post: _Aka_
  Refresh spline doesn't seem to be working dazz777 4 139 11-13-2019, 11:13 PM
Last Post: _Aka_

Forum Jump: