playMaker

Author Topic: Help on basic animations[SOLVED]  (Read 156 times)

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Help on basic animations[SOLVED]
« on: October 14, 2017, 08:52:04 AM »
Hi, i'm using a prefab which contains an event proxy for receiving a callback event from another component, but it doesn't instantiate with the prefab. Any solutions how to set it up?

Here's the image, i'm using it forward the callback event to the parent  to play the animation


Well, i sorted things out with the event proxy without using it, i'm just invoking the method when shooting. But i have a different problem. Animations were always confusing for me, animator, animation, animation controller, bwah.

The idea is to have the invoked method trigger the animation on the ship when it shoots, but i have no idea how to set it up right. I've set up the FSM to play the animation, but what should the prefab of the object that is to play the animation contain?

I've got the animation and animation controller, what should i do to make it happen :P

Here's the setup, but it doesn't work:

Animation is on the object that should be animated



And this is the FSM



Nothing out of the ordinary, but it doesn't work. I tried setting the animation to legacy too, but nothing.

Edit: I checked the debug log of the FSM that is supposed to play the animation, no errors.
« Last Edit: October 25, 2017, 02:05:54 AM by jeanfabre »

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Re: Help on basic animations
« Reply #1 on: October 16, 2017, 08:29:57 AM »
Anyone? I'm going out of my mind. I also tried making a new animation and then inserting sprites from the sheet. Nothing. I can't even play the animation in the animation window, i don't know why.
« Last Edit: October 16, 2017, 08:53:37 AM by krmko »

Carmichael

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Help on basic animations
« Reply #2 on: October 16, 2017, 09:44:47 PM »
so your explanations are a bit confusing, but from what i see here nothing should be wrong with this, are you working with  a humanoid character?

you should also be sure that your script is logically free of errors, i really dont understand what your main issue is but it doesn't look like a difficult case if you can give a more concise explanation

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Re: Help on basic animations
« Reply #3 on: October 16, 2017, 11:56:10 PM »
Ok, i'll try my best. First of all, i use legacy since i don't really need avatar masks, root motion, blend trees and such, just a simple play animation and stop when done.

The animation is just a simple ship firing, something like this



1. I drag in the spritesheet from windows explorer into textures folder
2. I set sprite mode to multiple and slice the spritesheet
3. I select all the sprites from the sheet and drag them into the scene
4. New animation is automatically created
5. I turn on the legacy mode for that animation
6. I insert the animation component to the object i want the animation to be played on
7. I insert the animation clip in the animation component
8. I create the FSM with play animation action pointed to that object and that animation and that's it

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Re: Help on basic animations
« Reply #4 on: October 17, 2017, 06:02:08 AM »
I've got the thing working with the animator, but it's stupid, i need to use mecanim, turn off exit state every time, put one empty state for idle and then use play animator action. I would really like to know how to get it working in legacy mode, it's much more simple, i don't need no goddamn idle state, exit states, IK and blending.

Carmichael

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Help on basic animations
« Reply #5 on: October 19, 2017, 11:09:22 AM »
yes , you're right, mecanim is the best way to go, my browser crashed and i just got it working, if you have any other issues with animations i can help!

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Re: Help on basic animations
« Reply #6 on: October 20, 2017, 02:27:32 AM »
I'll let you know, i'll probably be in the dark if a need for something more advanced arises :)