playMaker

Author Topic: HOTween - Enemy Patrolling Rotation  (Read 4441 times)

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
HOTween - Enemy Patrolling Rotation
« on: October 18, 2013, 04:20:55 AM »
I've set up an object with a transform tween that goes from point A to point B using the HOTween Editor. Now, I want the object to turn around once it has reached point B and continue the loop so it acts like an enemy patrolling a ledge or something.

So I applied another transform tween, a rotation, that I gave a value of 180 in the Y axis and set the delay to match the duration of the position tween (to give the effect that it turns around once it has reached the end of the platform). But I can't figure out the proper setting so that it does this continuously. Currently, once the object reaches the first rotation point, it disregards the delay and just keeps rotating without waiting. Any suggestions? Thanks!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: HOTween - Enemy Patrolling Rotation
« Reply #1 on: October 18, 2013, 10:38:49 AM »
Which rotate command did you use?

I think iTween Rotate Add should work for this. Just use multiple states to control the Wait between moving back and forth and put the rotate in there with the Wait.

I'm not familiar with HOTtween, or how different it is from the iTween commands.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: HOTween - Enemy Patrolling Rotation
« Reply #2 on: October 21, 2013, 02:00:18 AM »
I would say HOTween is a lot more straightforward for an artist (me). The actions are definitely not as intuitive as the ones offered for iTween.

I'm having difficulty using Playmaker to create tweens without using the HOTween editor.

There is also no documentation on the Action Reference page. Will there be in the near future? It would be greatly appreciated.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween - Enemy Patrolling Rotation
« Reply #3 on: October 21, 2013, 02:58:33 AM »
Hi,

Yeah, iTween and Hotween are very different in the way they work, and It takes time to understand how the hotween visual editor works...

 You are actually more or less expected to use the hotween editor to create tweening. Tho, when it comes down to tweening FsmVariables, then you only need actions.

So basically, create tweens, and give them uique names, and fire them by referencing them by their names.


Bye,

 Jean

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: HOTween - Enemy Patrolling Rotation
« Reply #4 on: October 21, 2013, 08:28:00 PM »
I tried creating tweens separately for translation and rotation using the HOTween editor. But how do I apply them to different states via Playmaker?

If I make two tweens, one for rotation and one for translation, it will be applied to the same object. Then, I want to make two states. In this case, a MoveRight state that has a tween that moves to the right and then a tween that rotates 180 degrees. Once this is done, it triggers a transition to a MoveLeft state with a tween that moves to the left and rotates again etc. Would this work?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween - Enemy Patrolling Rotation
« Reply #5 on: October 22, 2013, 02:24:48 AM »
Hi,

 yes, make two different tweens, one called "pos" and one called "rot" and trigger the one you need when you need it within your fsm.

bye,

 Jean

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: HOTween - Enemy Patrolling Rotation
« Reply #6 on: October 22, 2013, 03:14:04 AM »
thanks, but the problem is that when I have multiple tweens on the same object, they play simultaneously.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: HOTween - Enemy Patrolling Rotation
« Reply #7 on: October 22, 2013, 03:22:00 AM »
Hi,

 Can you send me that object as a prefab in a Unity package, and I'll see how to control  them individual tweens properly.

bye,

 Jean

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: HOTween - Enemy Patrolling Rotation
« Reply #8 on: October 23, 2013, 02:55:31 AM »
sent. thank you!