playMaker

Author Topic: HOTween playmaker custom actions  (Read 58117 times)

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #15 on: March 18, 2013, 09:09:30 AM »
Yes, i am playing one Tween per State!

And in the Fields

Quote
EVENT
Completed:
Failed:

In Completed i chose "FINISHED", but it still works in that simultaneous way.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15563
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #16 on: March 18, 2013, 09:13:53 AM »
Hi,

 yep, cause you should not use FINISH for this, create your own event like "TWEEN DONE" or just "DONE" actually, and use that event. FINISH is a built in event that you should never call manually or have in a state that you expect to last because if one of the action has finished its task it will fire the "FINISHE under the hood, so in your state ONLY have "DONE" event as a transition.

bye,

 Jean

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #17 on: March 18, 2013, 09:27:17 AM »
Hm, tried to do that:



After the action is completed, it stays in that certain state and doesn't go on.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15563
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #18 on: March 18, 2013, 09:41:01 AM »
Hi,


 I get it, it's because I was expecting that you use a variable for the completed loops counter, and without it I would not fire the completed event.

 I have updated the package, else you simply inject a variable to watch the completed loops for the tween and the completed event will fire when the tween completes

bye,

 Jean


Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #19 on: March 18, 2013, 09:55:00 AM »
Gosh, i totally didn't look out for that field  :-[
Could hit myself for that...

Anyway. Thank you very much, jean! Dammit, i have to learn by myself to write Actions...

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: HOTween playmaker custom actions
« Reply #20 on: March 20, 2013, 08:46:07 PM »
Hi,

I'm currently looking to move to HOTween (from iTween) and have been trying to animate a pickup to the player as they get within a certain distance. However so far (using HOTween Vector3) whenever the pickup animates to the player, the end point is always the position the player was in when the animation started.

Is there a way using HOTween/playmaker actions to animate the pickup to the player while the player is moving?

Cheers
Andrew

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15563
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #21 on: March 21, 2013, 12:46:51 AM »
Hi,

 tween engines are likely not your solution of choice for such cases where the target is changing over time.

 instead prefer other solutions like "move towards", "smooth follow Action" and other "seeking" behavior that you can implement yourself using "vector3 Lerp" for example, which will give you far better results and actually the expected behavior.

Does this all make sense?

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: HOTween playmaker custom actions
« Reply #22 on: March 21, 2013, 02:01:27 AM »
Sure does! Thx jeanfabre

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Re: HOTween playmaker custom actions
« Reply #23 on: April 08, 2013, 06:11:15 PM »
Hi!,

I have been playing today a little with hotween actions and I think I found a bug. The bug comes when using for example the Vector3 tween action. It seems it ignores the Start entry if it is inserted manually (not through a var).

Cheers.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15563
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #24 on: April 09, 2013, 03:04:43 AM »
Hi,

 I can't repro this, have you download the latest?

 if you can send me a small repro project, I'll have a look.

bye,

 Jean

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Re: HOTween playmaker custom actions
« Reply #25 on: April 09, 2013, 04:09:41 AM »
Hi!,

I have downloaded last here at playmaker site. I will send you a repro case as soon as I get home.

Thanks for the interest.

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Re: HOTween playmaker custom actions
« Reply #26 on: April 10, 2013, 12:18:42 PM »
Hi!,

Well now I'm really embarrased. I have retested what I commented in the previous post and it is working ok :/. The only thing I did was create a new project and make a little example and it works ok. Sorry for the confussion.

On the other hand, the way I'm using hotween actions is writing the result of the tween to a playmaker variable (called result in the action) and then update every frame the real target with a set property action that updates every frame. Is this the right way to do it?

For a transform.position tween it would be:

1) Create Vector3 temp var in playmaker
2) Setup a tween to write the result to this variable
3) Use a property to write to transform.position of the required object

Could you confirm if this is the best way to do it? I don't like the bridge variable but it seems there's no other option.

Thanks in advance.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15563
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #27 on: April 11, 2013, 02:01:15 AM »
Hi,

 if you want to use Fsm var, yes, that's right way. Now you can set up a tween on the object itself and trigger the tween using the action "HotweenPlayById" then you rely on hotween all the way in terms fo performances during the tweening.

bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: HOTween playmaker custom actions
« Reply #28 on: July 19, 2013, 02:06:38 AM »
Hi, is there any chance we can get a Hotween Stop by Id?

I have a loop playing and I would like to enter a new state and tell that loop to reset back to 0 stopping the loop and going to the start of it.

edit: Play Backwards on Play By Id doesn't seem to play it in reverse.

edit2: Also when I reload the scene my FSM that is playing the action becomes disabled and I get this.

NullReferenceException: Object reference not set to an instance of an object
Code: [Select]
Holoville.HOTween.Tweener.Rewind (Boolean p_play, Boolean p_skipDelay) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:910)
Holoville.HOTween.Tweener.Rewind (Boolean p_skipDelay) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:278)
Holoville.HOTween.Tweener.Rewind () (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__HOTween.Assembly/HOTweenV1/Tweener.cs:267)

If I disable the action to play the HotweenPlayById it works fine when I reload.

Thanks!
« Last Edit: July 19, 2013, 03:34:48 AM by sebaslive »
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15563
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #29 on: August 05, 2013, 04:43:45 AM »
Hi,

 I have no problem with all this, What version of hotween do you have? If you can pm me some samples for me to check, maybe therer are corner cases.

bye,

 Jean