playMaker

Author Topic: Trigger Animation  (Read 3376 times)

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Trigger Animation
« on: January 12, 2015, 07:29:11 AM »
Hi this is hopefully something simple, but I'm having trouble with it.

I am using Vuforia AR with Playmaker, everything is fab! But I want to trigger an animation on a model when a button is pressed. I have buttons setup via NGUI.

I've added actions 'Animation Settings' and 'Play Animation' attached the model and selected the animations. No joy. Just plays animations automatically when I hit play.

Any guidance or pointing in the direction of a tutorial which covers this would be great. I have looked into this before posting, might not be searching correctly.

Any help would be super.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Trigger Animation
« Reply #1 on: January 12, 2015, 07:37:38 AM »
Have you unchecked Play Automatically on the Animation component?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Trigger Animation
« Reply #2 on: January 12, 2015, 08:21:16 AM »
Yes I have.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Trigger Animation
« Reply #3 on: January 12, 2015, 09:01:54 AM »
How are you gating the transition to the state? It can't play the animation unless you get into the state doing the Play Animation action, so it seems like that would be the culprit here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Trigger Animation
« Reply #4 on: January 12, 2015, 09:42:20 AM »
Hi Lane,

Could you explain what you mean by gating? Not understanding the terminology.

many thanks

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Trigger Animation
« Reply #5 on: January 12, 2015, 09:46:16 AM »
The animation is playing in a state, so how are you transitioning into that state? (A gate would just be the conditions allowing it to pass through to that state.) Is it transitioning into the Play Animation state when it isn't supposed to?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Trigger Animation
« Reply #6 on: January 12, 2015, 10:24:02 AM »
Got you.

YEs there is a onClick function using NGUI which is pressed first. But the animation isn't listening to it and just firing the animation.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Trigger Animation
« Reply #7 on: January 12, 2015, 10:52:24 AM »
So in [State 1] you are doing nothing, and have a [Button Clicked] event transitioning into [State 2] where the animation is played. The transition cannot fire unless you tell it to so first make sure you aren't using the FINISHED event to transition (as this would fire immediately) then make sure the NGUI click setup is communicating with the state correctly.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Trigger Animation
« Reply #8 on: January 12, 2015, 11:34:42 AM »
I've almost got it working. On a load up the button works by following your guidance. But I have to replay to get the animation to refire.

Under State 2 I have the Play Animation and Animation settings attached and configured to the model and animations I'm testing. Am I missing something on state two to be able to press the button again to refire?

Thanks so much for your help so far Lane.

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Trigger Animation
« Reply #9 on: January 16, 2015, 07:16:20 AM »
Still not getting anywhere with this issue :(