Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: LordyLordyLordy on April 12, 2011, 01:49:24 PM

Title: [solved] Get Axis & Get Axis Vetor not working?
Post by: LordyLordyLordy on April 12, 2011, 01:49:24 PM
I am working on building a third person camera.  If you help me out, I will post my solution to the forums when I'm done.  

I need to pull the speed that the mouse is moving to the left or right and adjust accordingly.  I have tried both Get Axis and Get Axis Vector.  Both return zero and the execution of the state totally freezes on that Action.  The debug values print out once and don't print again.

(http://img849.imageshack.us/img849/3922/getaxisproblems.jpg)

Title: Re: Get Axis & Get Axis Vetor not working?
Post by: MaDDoX on April 12, 2011, 04:23:11 PM
Did you toggle "every frame"? If you don't it only executes once.
Title: Re: Get Axis & Get Axis Vetor not working?
Post by: LordyLordyLordy on April 12, 2011, 04:52:24 PM
I'm feeling totally stupid here but where is that flag set for those actions?  Thanks for the help.
Title: Re: Get Axis & Get Axis Vetor not working?
Post by: elvis75k on April 13, 2011, 07:49:21 AM
Quote
I'm feeling totally stupid here but where is that flag set for those actions?  Thanks for the help.
You can find every frame on almost every math action. I guess you can use > set fsm vector3 to modify vector3 every frame.
Title: Re: Get Axis & Get Axis Vetor not working?
Post by: MaDDoX on April 13, 2011, 08:29:23 AM
Quote
I'm feeling totally stupid here but where is that flag set for those actions?  Thanks for the help.
I got your point, I haven't double checked the action, my bad. Get Axis really doesn't have any "every frame" toggle, so to make it execute every frame simply add a default "finished" transition to the state and point it back to the same state. This will make it loop indefinitely. To break out of the loop, you can either have a logic conditional action (eg.: boolcompare pause=1) which branches to another state, or you can disable/pause the whole controller FSM from another master/gameflow FSM (https://hutonggames.fogbugz.com/default.asp?W55).

The second is a more robust approach imo.
Title: Re: Get Axis & Get Axis Vetor not working?
Post by: Alex Chouls on April 13, 2011, 04:45:41 PM
Actually most Input actions don't have an EveryFrame option because it's implicit in their function - they either wait for or get continuous input, so they run every frame automatically (you don't need to loop it). Hint: When running the game, if an action is active its name is highlighted green, if/when it finishes, it dims out. I'll also add some clarification about Input and EveryFrame to the docs...
Title: Re: Get Axis & Get Axis Vetor not working?
Post by: LordyLordyLordy on April 14, 2011, 03:11:19 PM
Thanks for all the help.  I was able to figure it out.  PlayMaker still requires a solid understanding of what is happening underneath the hood in Unity.  This keep the barrier high when learning the technology but smooths out workflow later on.  My team and I are still new to the tech.  Deprogramming our Unreal wiring is taking some time.  You help on the forums is super helpful.
Title: Re: Get Axis & Get Axis Vetor not working?
Post by: Alex Chouls on April 15, 2011, 04:10:15 PM
Yeah, it definitely helps to understand how Unity does things. I try to respect how Unity works, so if you're already familiar with it things "just work" the way you'd expect. I want to make more training videos that show how to use Playmaker while also introducing Unity concepts. I think that will help.