playMaker

Author Topic: Get rotation from animation  (Read 1383 times)

Airblaster

  • Playmaker Newbie
  • *
  • Posts: 9
Get rotation from animation
« on: July 12, 2016, 11:02:16 PM »
Still trying to work out how to let the animation determine direction.

If the character is rotated 90 from a turn animation, how do I tell the idle animation that
the character is now rotated so that when it goes back to idle the character doesn't
rotate back to the start position?

Thanks for any help.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Get rotation from animation
« Reply #1 on: July 13, 2016, 01:22:11 PM »
Hi,

Are any of these animations mecanim and have root motion ?

If so, you may need to play around with the import settings, I'm not too familiar with it, būt this image shows what to look for: https://www.google.nl/search?q=mecanim+animation+import+settings+rotation&rlz=1Y3NDUG_enGB514GB514&prmd=visn&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjBw_fb9_DNAhULORoKHe9oClkQ_AUICCgC&biw=962&bih=601#imgrc=ALBtx2qJlxeR6M%3A

Depending on your situation, you may Need to turn it off or on, on the idle or the other anim.

Good luck hope this helps and if not maybe you could provide more info about your situation (like what animation system you are usimg and if they have root motion) and maybe a anim expert will come along and figure it out.

Airblaster

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Get rotation from animation
« Reply #2 on: July 13, 2016, 10:58:51 PM »
Hey Zeldag thanks for the reply.
I am using mecanim and exporting from Maya.
I'm sure I have tried the things you suggested but still get issues.

I have animated the character moving away from world zero.

I am trying to make 3rd person top down with camera just following, no rotation.

I would imagine a lot of people are doing the same but can only find tutorials where the
character walks side to side or back, and I don't want to use smooth look at direction
because of the sliding feet thing, the animated turn looks so much better.

So an issue is that if he rotates to a new direction using the root once the transition in mecanim
goes back to idle he slides back to the idle pose which is initially facing forward.

The other thing is that if I can get him to stay facing right that will determine what animation will
play next depending on what key is pressed.
For example if he is facing right and the player presses 'W' he should rotate left 90 to face up.
Or from the right he presses 'A' he should play rotate 180 turn to be facing left, ( much like the smooth look at direction works with the default input keys of WASD)

Hope that makes sense!