playMaker

Author Topic: Please help a noob (3rd P controller)  (Read 2436 times)

Icehut

  • Playmaker Newbie
  • *
  • Posts: 3
Please help a noob (3rd P controller)
« on: December 17, 2014, 07:53:26 AM »
Hey guys

I'm trying to create a very basic controller for 3rd person here in animator.

i've watched some video about using FSM, but still dont know how to change the character from Idle to Walk with the animator. what action do i need to add in to the FSM so my character can start walking with animations?
ATM when i press play, my character can move, but it doesn't show the walk animation i put in the animator controller.
 :-[ :-[ :-[ :-[ pleaaaaaaaaassssssssseeeee help...



Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Please help a noob (3rd P controller)
« Reply #1 on: December 17, 2014, 08:41:26 AM »
You need the Animator actions here:
https://hutonggames.fogbugz.com/default.asp?W1031

Then you just update the variable (or event) in your controller depending on what state your FSM is in.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Icehut

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Please help a noob (3rd P controller)
« Reply #2 on: December 17, 2014, 08:59:07 AM »
Thank you for the reply

i already download the playmaker animator, but don't know what to do next, i followed the 3rd person, and made a controllable object, and i'm stuck lol ( banging my head right now)

currently I've put Idle state and Walk state in the controller, and also did in FSM, but how do i make the transition between Idle to Walk, i already put the transition between them, (if speed is greater then 0.1 it goes to walk), i add a Float in Parameter but how do i let FSM know that when i press W it means go to Walk state and shows the animation of walk?
 

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Please help a noob (3rd P controller)
« Reply #3 on: December 17, 2014, 09:15:27 AM »
Yep, you influence that transition in the Animator by changing the Speed variable.

For instance in your FSM you'll have a Speed variable, just use Set Animator Float to inject your FSM Speed variable into the Animator's Speed variable and the transitions that are reading that variable (greater than 0.1, for example) will read it and fire the transitions appropriately.

If you're uncertain about how to obtain the Speed variable, you can make a very simple one by using the input Axis. Likely you have Get Axis storing a float value when W is pressed? That float can be used as the Speed, because it moves the player forward. It's not literally the speed, but it works basically the same and should get your character animating.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Icehut

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Please help a noob (3rd P controller)
« Reply #4 on: December 18, 2014, 06:32:02 AM »
Wow~ Lane! you just made  me see hope again! thank you so much!!!

messed around with the FSM, and finally when i press down W it goes to Walk, that's really exciting for me, I'm really just starting this as a Hobby and interest lol, had no experience whats so ever, thank you man!!

but the simple controller i made have issues, i in "walk state" set float animator, get axis vector, smooth look at direction, and simple control with the character controller, and button up for states to go back to Idle, and Idle has a States with Set float animator, get button down goes to states Walk, ATM i let go my W key, it goes to Idle, but when i press A and D key it continuous to Walk, i think i got that issue solved, but now when i press a Moving key,it goes back to Idle, how ever it doesn't feel smooth at all, kind like if the character move left it has to go to Idle before it move to right again, it has that wired feel to it, lol. do you know how to solve this? ATM i only have two State, Idle to Walk and Walk to Idle, Thanks man, and Marry Christmas to you.

By the way is it possible if you could give me a Template so i can learn better? thanks again.

Regards


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Please help a noob (3rd P controller)
« Reply #5 on: December 18, 2014, 08:10:13 AM »
If you're changing the state in your FSM you need to have Set Animator float in each state. Else, you might not have the right exit conditions in your Controller to transition back to Idle, but it sounds like the variable simply isn't getting updated correctly. Screenshots would help.

I don't have a template for you, the Mecanim examples might be of help though. I should make a tutorial on setting this sort of thing up in Mecanim, thanks for the use case.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D