playMaker

Author Topic: [SOLVED] Unable to Play ANimation  (Read 1643 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
[SOLVED] Unable to Play ANimation
« on: June 11, 2019, 09:53:33 AM »
hi !

Making a Crossy Road prototype. I created Idle and Jump animation from ANimation windows. Then, Tried to play it from FSM. Since Idle is default state, It working well. But, Jump animation not working. It working only on Animation windows.

Check video >>>>
2. Can I ignore this issue for now and complete the prototype and fix animation at last or should I fix and continue ?

Thanks
« Last Edit: June 13, 2019, 11:52:56 PM by heavygunner »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Unable to Play ANimation
« Reply #1 on: June 11, 2019, 11:51:38 AM »
Hi.
is the transform on the jump animation on the same object as the movement?

if so you might want to add a parent, then do movement on parent and animation on child.

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Unable to Play ANimation
« Reply #2 on: June 11, 2019, 12:03:23 PM »
Hi.
is the transform on the jump animation on the same object as the movement?

if so you might want to add a parent, then do movement on parent and animation on child.
Yes, Movement on parent and Animator controller on Child. Player moving without any issue, Jump animation is not working

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Unable to Play ANimation
« Reply #3 on: June 11, 2019, 02:07:55 PM »
Hi.
Hmm i can see @0:03 that there is a rigidbody and collider is this doing the jump animation or in a child of this?

if you want you can make a prefab of it and send to me so i can have a look (export without dependencies but include animation files)
or you can make the same movement/animation with a standard cube and send that :)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Unable to Play ANimation
« Reply #4 on: June 11, 2019, 08:18:56 PM »
Hi.
Hmm i can see @0:03 that there is a rigidbody and collider is this doing the jump animation or in a child of this?

if you want you can make a prefab of it and send to me so i can have a look (export without dependencies but include animation files)
or you can make the same movement/animation with a standard cube and send that :)
Thank you.
I just sent that to your Inbox

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Unable to Play ANimation
« Reply #5 on: June 12, 2019, 08:30:55 PM »
Anyone?
I attached Prefab and animation files.

Thank you

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Unable to Play ANimation
« Reply #6 on: June 13, 2019, 08:04:18 AM »
Hi,
Several parts where broken on what you send, also there are dotween actions used.
I don't know if its from the payed version or not, so i removed them on my sample and used float interpolate instead

also move to/idle did not have a animator play, to play idle

on Player Movement there is only a send event on the waiting for input not on movement so i added a event to send on each movement

Mesh was not there either so i replaced with a cube so you can see the object :)

i renamed the folders so it should not overwrite yours (DJAYDINO folder)

It should be working now

OffTopic

I also noticed you use way to much Globals :)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Unable to Play ANimation
« Reply #7 on: June 13, 2019, 11:19:39 PM »
Hi,
Several parts where broken on what you send, also there are dotween actions used.
I don't know if its from the payed version or not, so i removed them on my sample and used float interpolate instead

also move to/idle did not have a animator play, to play idle

on Player Movement there is only a send event on the waiting for input not on movement so i added a event to send on each movement

Mesh was not there either so i replaced with a cube so you can see the object :)

i renamed the folders so it should not overwrite yours (DJAYDINO folder)

It should be working now

OffTopic

I also noticed you use way to much Globals :)
Thank you very much.

Downloading and checking it. :)

Yes, I use Free dotween action which found on playMaker forums.
I always prefer using globals for most time. I don't know why.
Having many globals make any impact on performance ?


EDIT : Thank you very much. I tested with with another animal. It is working. BTW, I never used Vector Interpolate :D Have to learn about it . :)
Animal should rotate when he go left and right. For that can I use Dotween rotate ?
« Last Edit: June 13, 2019, 11:46:46 PM by heavygunner »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [SOLVED] Unable to Play ANimation
« Reply #8 on: June 14, 2019, 04:42:23 AM »
Hi.
you can, but you can also use the 'float interpolate'.

to turn left, get current rotation Y (can be x or z depending on your project)
then use opperator and add -90 (or subtract 90) store in a new variable.
then interpolate current ROT / New ROT.

have a look at this : https://hutonggames.fogbugz.com/default.asp?W1462