Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: JonathanBurroughs on March 24, 2014, 11:50:56 AM

Title: [SOLVED] Get Axis Vector - differentiating forward and backward movement
Post by: JonathanBurroughs on March 24, 2014, 11:50:56 AM
Hello again,

I'm using Get Axis Vector to drive my player in concert with Controller Simple Move.

I've been passing through the Store Magnitude float to an Animation Controller to control when to switch a movement animation on and off on my player model.

However I'm unable to differentiate between forward and backward movement - the float is always positive.

What is the best way to perform this check using the standard first / third person setup?
Title: Re: Get Axis Vector - differentiating forward and backward movement
Post by: JonathanBurroughs on March 25, 2014, 05:46:38 AM
Is it okay if I bump this? I really hope there is a solution out there!
Title: Re: Get Axis Vector - differentiating forward and backward movement
Post by: Lane on March 25, 2014, 06:05:22 AM
No problem bumping! Sometimes threads can get lost accidentally =)

You couldn't use magnitude for this since it can't be negative. You could pull the information out of the Axis input and use that, however. You would just use the Z information, neg is reverse, pos is forward.
Title: Re: Get Axis Vector - differentiating forward and backward movement
Post by: JonathanBurroughs on March 25, 2014, 06:24:06 AM
Ah. I could use Get Vector3 XYZ on the Get Axis Vector "Store Vector" and pull out just the Z information, as you suggest. Okay, giving that a go now.
Title: Re: Get Axis Vector - differentiating forward and backward movement
Post by: JonathanBurroughs on March 25, 2014, 06:31:27 AM
Nope. I was wrong. And misread your instructions.

Checking the Z of the Store Vector only told me the amount of Z movement in world space.

By running Get Axis on the Vertical input I can differentiate between forward and backward (and measure intensity).

Thank you so much for your help, Lane!