playMaker

Author Topic: [SOLVED] Get Axis Vector / positive vs negative value  (Read 3312 times)

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
[SOLVED] Get Axis Vector / positive vs negative value
« on: February 01, 2014, 11:33:28 AM »
Hi,

I am using Get Axis Vector. I would like the value get on Horizontal axis, to be stored with a different Multiplier depending on : NEGATIVE Horizontal, or POSITIVE Horizontal ?

how make it possible ?
« Last Edit: February 02, 2014, 07:51:36 AM by vonpopov »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get Axis Vector / positive vs negative value
« Reply #1 on: February 01, 2014, 11:47:10 AM »
You would use 2 states and a float compare to send it to the Negative state where it stores the axis in a different float.

Or, modify the action to do a compare internally and store the float in different variables depending on its value. This is better.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: Get Axis Vector / positive vs negative value
« Reply #2 on: February 01, 2014, 11:58:40 AM »
You would use 2 states and a float compare to send it to the Negative state where it stores the axis in a different float.

Or, modify the action to do a compare internally and store the float in different variables depending on its value. This is better.


i did like this, and it works.

Get axis vector3 > Get Vector XYZ (split into 2 float) > compare X to 0 , if less = do nothing, if greater then go another state and do = float muliplier 0.5 > Compare X to 0, if less return previous state, otherwhy continue.

What do you think ?


Thanks for your help :)




parallel

  • Full Member
  • ***
  • Posts: 155
Re: Get Axis Vector / positive vs negative value
« Reply #3 on: February 01, 2014, 01:38:13 PM »
There's also the 'Float Sign Test' action, sending events based on a floats sign +/-

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: Get Axis Vector / positive vs negative value
« Reply #4 on: February 01, 2014, 05:35:54 PM »
There's also the 'Float Sign Test' action, sending events based on a floats sign +/-

Wow i didn't know.
I am gonna optimize my work with that action !

Thanks you


Nb : tested, it works with a cleaner code !!!! wow thanks you !
« Last Edit: February 01, 2014, 05:43:33 PM by vonpopov »