playMaker

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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
HOTween playmaker custom actions
« on: September 18, 2012, 07:07:38 AM »
Hi everyone,

 Ok, I reached a point where the custom actions I made for Hotween are worth checking now :)

 so download this package attached to this thread, and give it at go, you'll find two major part:

-- Fsm variable tweening. You can tween any Fsm variables with a series of HOTween actions ( EVEN STRINGS!!). you'll find a working example in the test scene under "fsm value tweening test"

-- the custom action hotweenPlayById. this is one relies on the HOTween visual editor ( that you can download on the following site: http://www.holoville.com/hotween/ )

 It works by referencing a hotween you created using the visual editor, this then allows you to build the tween you want without effort, and you simply reference it by it's id.

WARNING, you need to download the hotween pacakge from the website, for some reason the asset store version is not up to date:

http://www.holoville.com/hotween/

 Any questions, feel free to ask. It's still very early, so don't hesitate to comment on what you would like it to work, etc etc.

bye,

 Jean
« Last Edit: August 04, 2014, 08:42:20 AM by jeanfabre »

Nezabyte

  • Playmaker Newbie
  • *
  • Posts: 5
Re: HOTween playmaker custom actions
« Reply #1 on: September 19, 2012, 11:19:57 PM »
Thanks for this! We decided to check out HOTween and are always happy to see available actions to use for Playmaker. Will try them out.

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: HOTween playmaker custom actions
« Reply #2 on: September 25, 2012, 09:55:25 AM »
thanks, this looks like a really useful add on!

nick_h82

  • Playmaker Newbie
  • *
  • Posts: 36
Re: HOTween playmaker custom actions
« Reply #3 on: December 20, 2012, 04:53:57 AM »
Hi Jean,

Thanks for these actions, I've already implemented a float ease to good effect.

I've been attempting to have a craft that travels through different triggers, which in turn update a global variable describing 'wind' strength (float) and direction (vector3). When the craft opens a sail, it then turns into the active wind direction, stored as a vector 3, and has a force applied in the local z direction. The force application is working fine, but I'm having trouble with the attached vector 3 ease.

Note that the actions shown are part of a transition state, which then transfers to a state that is simply setting rotation and force every frame.

The global variable named WindRotationActive is ever-changing, so I'm intended to ease into it from a snapshot of the vector the craft is at on entering the state. However in practice the craft stays facing the initial vector, before snapping around to the WindRotationActive in the next state. Just wondering if I'm making any glaring errors in setup. Note that the next action is simply setting rotation to LocalCraftRotation.

I also tried to store the result as a separate vector, and set that in the following action. However in this case the craft would behave as above for some vectors, or turn to the WindRotationActive immediately on entering the transition state for others.

Edit: I realise 'relative' should be false and Loop Count -1 . I was experimenting at this point!
« Last Edit: December 20, 2012, 04:57:04 AM by nick_h82 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #4 on: December 21, 2012, 03:56:05 AM »
Hi,

I would try to store the result in a different variable ( or store the starting point in a different variable), it may be the problem,

 Bye,

 Jean

nick_h82

  • Playmaker Newbie
  • *
  • Posts: 36
Re: HOTween playmaker custom actions
« Reply #5 on: December 21, 2012, 05:33:21 AM »
Hi Jean, spoke to the programmers at work, and someone suggested I refactor to have a visual representation track a moving rigidbody with smoothFollow- this works beautifully and feels more natural.

Will keep the float ease to help apply thrust more smoothly.

Thanks for the help!

SeanC

  • Junior Playmaker
  • **
  • Posts: 61
Re: HOTween playmaker custom actions
« Reply #6 on: February 20, 2013, 03:17:13 PM »
Hi all,

Thanks for adding these Jean!

Im not sure if maybe Im just not using these correctly, but I'm trying to do something simple and getting unexpected results:

When the player hits a key, I transition to a different state where I have a "Hotween Float" action which simply interpolates between 2 numbers. When it completes, it returns to the first state. No problem.
However, no matter how I set up the tween, when I hit the key again and return to the second state, the calculation does not run again and I get stuck in that state.

It seems like there is no way to reset the tween on exit or enter. Is that something I'm missing or perhaps something we could get added?

Thanks!
Sean
« Last Edit: February 20, 2013, 04:33:22 PM by SeanC »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #7 on: March 01, 2013, 12:47:08 AM »
Hi,

 indeed, I can repro this, I am not sure I messed up there. I found the source of the problem, but I need to test more to validate why in the first place I went this way...

basically, you need to delete line 75 of script "PlayMakerHOTweenUtils" OR you need to reset the fsm variable you store the result to the start value.

 I will address this shortly and provide a new package.

bye,

 Jean

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Re: HOTween playmaker custom actions
« Reply #8 on: March 06, 2013, 05:57:46 PM »
Hi!,

Thanks a lot for this package. I'm a Hotween lover, so I will greatly benefit from it.

Did you manage to resolver that issue SeanC stated?

Thanks in advance.

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #9 on: March 07, 2013, 01:20:55 PM »
Hm, i am trying to use the "Hotween Play By ID" Action, but it doesn't work.



Getting a Warning:
Quote
Heart_01 : FSM : State 1 : HotweenPlayById : HOTween  not found

The ID in the Hotween Editor is Test and the same Name i wrote in the PM-Action.
Any ideas?

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #10 on: March 15, 2013, 03:49:22 PM »
No ideas on this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #11 on: March 18, 2013, 02:27:50 AM »
Hi,

 ok, please redownload from this thread, I have updated hotween with the latest version. Unfortunatly, the target feature is removed cause the api method IW as using has been removed, so your tween ids have to be unique, I can't filter tweens by target anymore, but I guess this is ok.

 Also, the fixed for result not being reseted on restart is now effective as well.

 if you found issues, let me know, setting up hotween to work as expected can be quite involving, but so far I can achieve what I want.

bye,

 Jean

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #12 on: March 18, 2013, 04:52:20 AM »
Thank you very much jeanfabre, it works now! I'm working with the visual Editor of HOTween, so i just will need the "Play by ID"-Action; so long it's working, everything is fine :P

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: HOTween playmaker custom actions
« Reply #13 on: March 18, 2013, 08:50:20 AM »
Hey there.

Well it isn't a big problem, i just wanted to mention it.

When i play by an ID, it works now fine.

For example, if i have my First Hotween-State:

- Move Object A from A to B.   It does so.

After this one is FINISHED the Second State comes in:

- Move from C from D to E.

The Thing is it kind of happens simultaneous. It doesn't wait, till the Action completed, meaning, the second State doesn't wait till Object A has reached point B, it starts the State2-Action when the First State-Action started.

I made a Workaround with various "Wait"-Actions, but it seems that isn't a nice solution at all.

By comparison, the iTween-Actions waited till each Action is completed entirely, than they start the next State after finishing.

Did i missed something?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween playmaker custom actions
« Reply #14 on: March 18, 2013, 08:53:18 AM »
Hi,

 yes, you can use the events specified in the action to wait for the tween to finish before transiting to another state. the key here is to have one tween per state

bye,

 Jean