playMaker

Author Topic: Curve Vector3 actions doesn't work properly.  (Read 4576 times)

Singyu Jo

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Curve Vector3 actions doesn't work properly.
« on: February 02, 2012, 11:08:37 AM »
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.

Singyu Jo

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Curve Vector3 actions doesn't work properly.
« Reply #1 on: February 02, 2012, 08: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.

MS80

  • Junior Playmaker
  • **
  • Posts: 63
    • View Profile
Re: Curve Vector3 actions doesn't work properly.
« Reply #2 on: May 09, 2014, 02: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"
« Last Edit: May 09, 2014, 03:14:48 PM by MS80 »

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #3 on: May 20, 2014, 06: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 ....
« Last Edit: May 20, 2014, 06:17:55 AM by doppelmonster »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Curve Vector3 actions doesn't work properly.
« Reply #4 on: May 20, 2014, 03:45:20 PM »
Sorry about that! Please try importing the attached fix.

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #5 on: May 20, 2014, 11:51:09 PM »
Great, works as intended now.

Thanks a lot, your support is outstanding!

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #6 on: May 21, 2014, 01: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


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).
« Last Edit: May 21, 2014, 03:41:59 AM by doppelmonster »

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #7 on: May 21, 2014, 03: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. ::)

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #8 on: June 13, 2014, 02: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?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Curve Vector3 actions doesn't work properly.
« Reply #9 on: June 14, 2014, 06: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.

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #10 on: March 15, 2015, 02: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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Curve Vector3 actions doesn't work properly.
« Reply #11 on: March 17, 2015, 01:34:59 AM »
Hi,

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

 Bye,

 Jean

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #12 on: March 17, 2015, 01:43:21 AM »
bug report send!

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Curve Vector3 actions doesn't work properly.
« Reply #13 on: March 23, 2015, 12:57:18 AM »
looks like its fixed in 1.78.3    :)