Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: Singyu Jo on February 02, 2012, 01:08:37 PM

Title: Curve Vector3 actions doesn't work properly.
Post by: Singyu Jo on February 02, 2012, 01:08:37 PM
Hi.

I've tested many cases to figure out.
I think as I tested,
Curve vector3 increases always positive even though "To vector - From vector" has negative components.

I want it helps you.
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: Singyu Jo on February 02, 2012, 10:39:24 PM
I found why it do that.

In CurveFsmAction::Init() method,
distances are always set positive.

It's original code.
Code: [Select]
distances = new float[fromFloats.Length];
for(int i = 0; i<fromFloats.Length; i++){
distances[i] = Mathf.Sqrt(Mathf.Pow(fromFloats[i]-toFloats[i], 2));
}

Fix following..
Code: [Select]
distances = new float[fromFloats.Length];
for(int i = 0; i<fromFloats.Length; i++){
distances[i] = toFloats[i] - fromFloats[i];
}

It works  :)
It's applied to CurveFloat, CurveRect, CurveVector3.
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: MS80 on May 09, 2014, 05:47:24 PM
This bug still exists!

Curve Vector3 increases always positive, even if you define a positive start vector and negative end vector, outcoming from this a return animation is not possible!

Bug fix by Singyu Jo is out-of-date  :(

Please fix "Curve Vector3" (which would be a really nice action)

EDIT:
=> same for "Curve Float"
=> same for "Curve Color"
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on May 20, 2014, 09:15:27 AM
bump.

I have the same problem and dont know how to fix it!

I am in urgent need of a curve float and or curve v3 action that animates in positive or negative direction depending on input ....
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: Alex Chouls on May 20, 2014, 06:45:20 PM
Sorry about that! Please try importing the attached fix.
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on May 21, 2014, 02:51:09 AM
Great, works as intended now.

Thanks a lot, your support is outstanding!
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on May 21, 2014, 04:59:51 AM
Now that my first problem is fixed i am running into a second one.

I am trying to reset the rotation made by user input with curve float.
So my reset event looks like this:

http://www.evernote.com/shard/s239/sh/ed74b8c2-20f9-4034-a63b-549ef8aa2982/0b21874e8cd87d66d7d3c81c7e97e41b (http://www.evernote.com/shard/s239/sh/ed74b8c2-20f9-4034-a63b-549ef8aa2982/0b21874e8cd87d66d7d3c81c7e97e41b)

It is working but the first frame on event entrance has a glitch. It looks like my vars (Board_X,Board_Z) are reset to zero. Afterwards the animation runs as intended.

Does curve float need some kind of pre-warming and resets the animated variable in that time?

I tried to add a delay. But the glitch happens before the delay.

I am not sure if this is a bug or if i am misunderstanding the usage of "curve float" (using it together with "set rotation" in one event, every frame).
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on May 21, 2014, 06:41:28 AM
Forget my last post!

I doubled an old state of the same fsm as a backup and forgot to deactivate it. That obviously caused problems. ::)
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on June 13, 2014, 05:39:51 AM
I just upgraded to 1.7.7.2 and noticed that the fix is not implemented in the update.

Shouldnt the fix be the default behaviour?
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: Alex Chouls on June 14, 2014, 09:54:51 AM
It will be in the next update. 1.7.7.2 was a quick release to address warnings in Unity 4.5.
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on March 15, 2015, 05:52:32 AM
We are now at 1.78 and the fix is still not implemented in the update  :o

Its really annoying to copy this fix into the action library with every update and prone to error.
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: jeanfabre on March 17, 2015, 04:34:59 AM
Hi,

 can you raise a bug report for this, it will bring back attention to this implementation.

 Bye,

 Jean
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on March 17, 2015, 04:43:21 AM
bug report send!
Title: Re: Curve Vector3 actions doesn't work properly.
Post by: doppelmonster on March 23, 2015, 03:57:18 AM
looks like its fixed in 1.78.3    :)