playMaker

Author Topic: [SOLVED] Get Axis Vector - differentiating forward and backward movement  (Read 2706 times)

JonathanBurroughs

  • Junior Playmaker
  • **
  • Posts: 73
  • Some kind of independent game developer
    • @HiFiHair
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?
« Last Edit: March 26, 2014, 08:22:17 AM by HiFiHair »

JonathanBurroughs

  • Junior Playmaker
  • **
  • Posts: 73
  • Some kind of independent game developer
    • @HiFiHair
Re: Get Axis Vector - differentiating forward and backward movement
« Reply #1 on: March 25, 2014, 08:46:38 AM »
Is it okay if I bump this? I really hope there is a solution out there!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get Axis Vector - differentiating forward and backward movement
« Reply #2 on: March 25, 2014, 09: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

JonathanBurroughs

  • Junior Playmaker
  • **
  • Posts: 73
  • Some kind of independent game developer
    • @HiFiHair
Re: Get Axis Vector - differentiating forward and backward movement
« Reply #3 on: March 25, 2014, 09: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.

JonathanBurroughs

  • Junior Playmaker
  • **
  • Posts: 73
  • Some kind of independent game developer
    • @HiFiHair
Re: Get Axis Vector - differentiating forward and backward movement
« Reply #4 on: March 25, 2014, 09: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!